DENVER (AP) Adam Frazier has been doing damage with his bat lately.
But it was his glove that helped Pittsburgh take a series in Colorado.
Chris Archer (4-5) was making his second start since being acquired from Tampa Bay before the July 31 trade deadline. He allowed two runs and five hits in five innings.
Felipe Vazquez got the last four outs for his 26th save.
Frazier had two doubles and a single, but made what might have been his biggest contribution on defense. With runners on the corners and two outs in the eighth inning, pinch-hitter Chris Iannetta hit a sharp grounder to the hole at second. Frazier made a diving stop and threw out Iannetta to end the inning and preserve the one-run lead.
''Flip's throwing 100 (mph) so I figured it was coming my way if he got inside of it and he did,'' Frazier said. ''He smoked it and I reacted. I dove and luckily it stuck to my glove. It saved the game for us. I'm pretty happy I made that play.''
His defense complemented a hot stretch at the plate. He got three hits in his first three at-bats and has raised his average 41 points to .280 over the past two weeks.
''He's been in a good place on both sides of the ball,'' manager Clint Hurdle said.
German Marquez (9-9) tied a career high with 10 strikeouts and David Dahl homered for the Rockies.
Colorado scored just six runs in the three-game series.
''That's sort of been the theme lately, lately meaning the last few weeks,'' Rockies manager Bud Black said. ''We just haven't seemed to string a big hit in there with a couple baserunners on base. We need that to turn around as we move forward.''
Archer retired the first eight batters before Marquez singled in the third. Colorado broke through in the fourth on Dahl's two run homer, his fifth of the season, to cut the deficit to 3-2.
''The homer I gave up was one of the only times I shook (catcher Francisco) Cervelli off,'' Archer said. ''That was my bad. I should have listened to him. It's huge to get a series ''W'' going into San Francisco.''
Pittsburgh led early on an RBI double by Gregory Polanco and a run-scoring single by Frazier in the first, and an RBI groundout in the third.
The Pirates added a run on Corey Dickerson's sacrifice fly in the eighth inning to make it 4-2. Ryan McMahon's RBI single made it close again.
Pirates: INF Josh Bell (left oblique strain) was activated from the 10-day DL and started at first base Wednesday. INF Jose Osuna was optioned to Triple-A Indianapolis.
Rockies: LHP Chris Rusin (plantar faciitis) pitched in a rehab assignment Tuesday night and was at Coors Field on Wednesday. Manager Bud Black said Rusin will be evaluated. ''We're encouraged by a lot of things we saw in his three outings,'' Black said.
Archer spent a lot of Tuesday in bed trying to shake off a bug that had Hurdle wondering if he would start Wednesday.
''We needed to come up with a plan B, and it was real,'' Hurdle said. ''For him to go out and pitch the way he did, it was a really strong effort.''
Archer said he wasn't sure what hit him, but suspected it was food poisoning. He said he felt a lot better when he woke up Wednesday morning.
''I felt good enough to pitch,'' he said. ''I haven't eaten a whole lot the last couple of days but, again, laid it out there for the guys and they picked me up.''
Marquez had a rough start but settled down to register a rare feet. The righty struck out the side in the fourth on nine pitches. He is the third pitcher to do it this season. It is the first time it was done at Coors Field.
The only other Rockies pitcher to throw an immaculate inning was Rex Brothers in 2014.
''I wasn't aware of that but I'm glad to be on that list,'' Marquez said.
Marquez followed his perfect inning with a leadoff walk in the fifth to Cervelli.
Pirates: RHP Ivan Nova (6-6, 4.49) takes the mound against the Giants in San Francisco on Thursday night.
Rockies: LHP Tyler Anderson (6-4, 4.05) will open a four-game home series against the Los Angeles Dodgers on Thursday.
More AP baseball: https://apnews.com/tag/MLBbaseball
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.