Pittsburgh, PA (SportsNetwork.com) - Jordy Mercer belted a go-ahead two-run double and the Pittsburgh Pirates turned a triple play in a 7-5 win over the St. Louis Cardinals on Saturday.

Mercer's hit came during a three-run sixth inning and helped Pittsburgh bounce back from an 8-5 loss in the three-game series opener on Friday.

Neil Walker hit a solo homer and Mercer finished with three RBI as the Pirates got just their second victory in eight games.

"We had some guys who were able to get something done and we were able to dig this game out of the dirt," Pirates manager Clint Hurdle said.

They turned a triple play in the second inning after Walker jumped to snare Yadier Molina's line drive at second base. They caught runners off base at third and second for their first triple play since last Sept. 14 against the Chicago Cubs.

Starting pitcher Vance Worley doubled and scored a run for Pittsburgh but didn't earn a decision after giving up five runs in five innings -- with all five crossing the place in the fourth.

Carlos Martinez (3-1) took the loss for St. Louis, which had won each of his previous five starts this season. He allowed seven runs in 5 1/3 innings and the Cardinals lost for only the second time in their last 12 games overall.

"He had a lot of positives to build on today," Cardinals manager Mike Matheny said of his 23-year-old right-hander. "I think we saw some things in his mechanics, but those are hard to fix in the middle of a game."

The Pirates cut into a 5-3 deficit with Walker's line-drive homer to right in the fifth inning, which came after Gregory Polanco was caught stealing.

They took the lead with a three-run sixth, loading the bases on a single by Sean Rodriguez and walks to Pedro Alvarez and Francisco Cervelli. Seth Maness came in from the bullpen to replace Martinez and Mercer doubled off the center-field wall on his first pitch, coming within feet of a grand slam.

Corey Hart added a sacrifice fly to make it 7-5, but Mercer was doubled off at second base to end the inning.

The Pirates bullpen shut the Cardinals down for the win. After Rob Scahill (1-2) pitched a perfect sixth inning for the win, Jared Hughes worked around a single in the seventh and Tony Watson overcame a walk in the eighth.

Mark Melancon followed with a 1-2-3 ninth to earn his sixth save of the year.

The Pirates took a 3-0 lead in the second inning, scoring the first run on a wild pitch, the second on a groundout and the third after back-to-back doubles by Worley and Polanco.

Worley kept the Cardinals off the board until the fourth, when consecutive no- out singles by Kolten Wong and Matt Holliday sparked a five-run rally.

Jhonny Peralta hit an RBI single and Jason Heyward and Molina followed doubles to drive in three more runs. Jon Jay's sacrifice fly with the bases loaded made it 5-3.

Game Notes

Martinez had seven strikeouts ... Pirates left fielder Starling Marte left the game after three innings with what the team called "severe dizziness." He was replaced in the field by Rodriguez ... The Cardinals are playing the series without third baseman Matt Carpenter, one of the team's offensive leaders, because of "extreme fatigue."