Nolan Arenado drove in the go-ahead run in the bottom of the seventh inning, and the Colorado Rockies completed their first three-game sweep in nearly four months with Sunday's 3-2 victory over the NL Central-leading Pittsburgh Pirates.

Arenado's RBI double off reliever Bryan Morris (5-5) proved to be the difference, with Rex Brothers working through a bases loaded jam in the ninth to preserve his 10th save and Colorado's first sweep since taking three from the New York Mets on April 16-18.

DJ LeMahieu knocked in a run for the Rockies and Manny Corpas (1-2) tossed a perfect seventh to relieve rookie starter Chad Bettis, who pitched an effective six innings of two-run ball in his Coors Field debut.

"As quickly as it can go sour, you've got to believe you can turn it around quickly. I'm proud of our guys," Rockies manager Walt Weiss said.

The Pirates, losers of six of their last seven road tilts, received 5 2/3 innings from starter Jeff Locke. He allowed two runs -- one earned -- on three hits and four walks.

"We pack it up and we go," Pittsburgh manager Clint Hurdle said of the loss. "You honestly self-evaluate and move on and get ready to play in St. Louis."

Pedro Alvarez homered for Pittsburgh, but his throwing error in the bottom of the sixth allowed the Rockies to tie the game at 2-2.

With runners on first and second and two out for Colorado, Corey Dickerson grounded a ball toward Alvarez, but the third baseman's throw sailed wide and into the stands to allow Yorvit Torrealba to score the tying run.

The Rockies then went ahead after scoring another two-out run in the seventh. Wilin Rosario laced a single off the leg of Morris and hustled around the bags on Arenado's double into the gap to give Colorado a 3-2 advantage.

Matt Belisle tossed a perfect eighth, but Brothers had some trouble in the ninth. He allowed a leadoff single to Neil Walker and then a one-out double to Tony Sanchez. After Jordy Mercer lined out, Brothers intentionally walked Gaby Sanchez to bring up Alex Presley, who popped out to end the game.

The Pirates scored a run apiece in the second and third innings. Alvarez jacked his 28th homer of the season to start the second and Andrew McCutchen knocked in Clint Barmes from third the following frame to open up a 2-0 lead.

Charlie Blackmon was plunked to start the home third, and got the Rockies on the board after swiping second, moving up a base on Locke's balk and scoring on LeMahieu's sacrifice fly.

Game Notes

It's the first time Rockies have won three in a row overall since May 21-24 ... Pittsburgh's Starling Marte was not in the starting lineup after taking a pitch off his left hand in the seventh inning of Saturday's game, but did pinch-run in the ninth inning ... The Pirates were 1-for-7 with RISP.