Rookie Pedro Alvarez hit a winning three-run homer with two out in the 10th inning to send the Pittsburgh Pirates to a wild 8-7 win over the Colorado Rockies on Saturday night.

Alvarez's 10th homer and second in as many days came on an 0-1 pitch from Huston Street (2-3) with Andrew McCutchen and Garrett Jones aboard.

Ian Stewart hit a tying three-run homer in the ninth for the Rockies and Todd Helton's two-run shot off Sean Gallagher (2-0) in the 10th made it 7-5.

Jones and Chris Snyder also homered for last-place Pittsburgh, which has won three of five. Alvarez, the No. 2 overall draft pick two years ago, connected for the ninth time at home this season, capping a 3-for-6 night.

The 36-year-old Helton, a former National League RBI champion, homered for only the third time this season, a line drive deep into the elevated seats in right after Dexter Fowler led off the inning with an infield single.

The Rockies have lost eight of their last nine on the road, making it difficult for them to remain in the NL playoff race.

Stewart's 16th homer was to right-center off Joel Hanrahan after Troy Tulowitzki and Brad Hawpe singled to lead off the ninth. Hard-luck Pirates starter Ross Ohlendorf was in line for his second win before Hanrahan's first blown save opportunity since he inherited the closer's job when Octavio Dotel was traded at the deadline last Saturday.

Stewart's drive was his fifth since the All-Star break and eighth coming in the seventh inning or later.

Pittsburgh trailed 1-0 before Snyder hit a three-run homer high off the left-field foul pole off Jorge De La Rosa in the sixth. It was Snyder's 11th homer and first since being acquired from Arizona.

Ohlendorf took line drives off his body early during each of his two most recent starts — including one off his head in Colorado on July 28 that forced him to leave the game in the first inning. He made it through Saturday unscathed, allowing two runs, one earned, and four hits in six-plus innings.

Colorado got an unearned run in the seventh, but Jones got that right back when he led off the bottom half with his 16th homer and fourth in six games against the Rockies this season.

NOTES: RHP Esmil Rogers will start for the Rockies on Sunday. Rogers is 1-2 with a 4.85 ERA in 13 games, two starts, this season. The rotation turn came available when the team placed RHP Aaron Cook on the disabled list Thursday. ... Every Pittsburgh starter had at least one hit — including the 6-foot-4, 245-pound Ohlendorf managing an infield single. ... The Rockies used every available pitcher in their bullpen.