PITTSBURGH (AP) Jordy Mercer had a pretty good seat for baseball history, then provided a little drama of his own.
The Pittsburgh shortstop broke out of a deep slump with three RBIs, including a go-ahead two-run double off St. Louis reliever Seth Maness in the sixth to propel the Pirates to a 7-5 win over the Cardinals on Saturday night.
Mercer watched second baseman Neil Walker and third baseman Jung Ho Kang play catch in the second inning for a rare 4-5-4 triple play. He then helped Pittsburgh end a seven-game losing streak to their NL Central rivals with a well-timed shot off the wall in centerfield. Mercer, who began the day batting just .186, smacked his hands as he reached second base out of relief more than anything.
''It's good personally but for the team it's even better,'' Mercer said. ''We showed a lot of character today.''
Walker added his second homer of the season for Pittsburgh. Rob Scahill (1-2) earned the win in relief. Mark Melancon worked a perfect ninth for his sixth save.
Matt Holliday went 3 for 4 for the Cardinals. Jhonny Peralta and Jason Heyward added two hits each. Both were on base in the second inning when Yadier Molina hit into the franchise's first triple play in nearly 12 years. Carlos Martinez (3-1) picked up his first loss after 5 1-3 erratic innings, giving up seven runs on seven hits, four walks and seven strikeouts.
''Sometimes (Martinez) gets feeling good and wants to turn it another gear,'' St. Louis manager Mike Matheny said. ''The other gear, really, doesn't play well for him. Turns into bad counts, turns into walks, turns into runs.''
Pittsburgh has slogged through the first month of the season and started the night trailing the Cardinals by nine games. The offense that has sputtered for long stretches, however, is showing signs of life. Pittsburgh has 19 runs over its last three games after managing just 15 total during a 1-7 slide that ended on Thursday.
The Pirates took an early 3-0 lead in the second but St. Louis pushed around Pittsburgh starter Vance Worley in the fourth. Four singles, two doubles - including one by Heyward that plated two runs - gave the Cardinals a 5-3 lead.
Martinez and the normally reliable bullpen couldn't make it hold up. Walker pulled Pittsburgh within 5-4 with a solo shot in the fifth and Martinez's control abandoned him in the sixth. A single and two walks loaded the bases for Mercer with one out. Maness came on, but Mercer drilled an offering to center for his biggest hit of the season.
Corey Hart added a sacrifice fly and Pittsburgh's bullpen took care of the rest.
''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.
Some quick thinking by Walker and some confusion by the Cardinals helped Pittsburgh turns its second triple play in as many years.
St. Louis had runners on second and third when Molina lined to second baseman Walker. He threw to third to double off Peralta. Heyward, who was only feet from the third-base bag, started walking off the field thinking the inning was over. Pittsburgh third baseman Jung Ho Kang pirouetted with the ball in his hand, briefly confused, before throwing back to Walker on second for the final out.
Hurdle joked the dugout was yelling at Kang, a rookie from Korea, ''in multiple languages'' to toss it to Walker. Heyward took the blame for the mix-up, saying he wasn't aware Walker did not touch second base after catching the liner.
''It was on me,'' Heyward said. ''That's my bad on that one.''
St. Louis last hit into a triple play when Atlanta shortstop Rafael Furcal made an unassisted triple play on Aug. 10, 2003.
Cardinals: 3B Matt Carpenter remained in St. Louis dealing with extreme fatigue. Manager Mike Matheny said he did not talk to Carpenter on Saturday. Carpenter is expected to rejoin the team on Tuesday in Cleveland. ... LHP Marco Gonzalez lasted just 2 1-3 innings in a rehab start for Triple-A Memphis on Saturday. Gonzalez, out since April 22 with a pectoral injury, gave up four runs before being pulled after throwing 56 pitches.
Pirates: LF Starling Marte left the game after the third inning with what the team called ''extreme dizziness.'' Marte struck out twice in two plate appearances and was replaced by Sean Rodriguez ... RHP Charlie Morton felt good a day after seven scoreless innings during a rehab start for Double-A Altoona. It's still uncertain when Morton, who is recovering from hip surgery, will return.
The series concludes on Sunday when Pittsburgh's Jeff Locke (2-2, 4.85) faces St. Louis' Tyler Lyons (0-0, 6.23 ERA). Locke is 2-2 with a 3.76 ERA in five starts against St. Louis. Holliday is 5 for 12 against Locke with a homer and four RBI. Lyons will make his second start for the Cardinals. He gave up four runs in 3 1-3 innings against the Cubs last week.