Jordy Mercer squirted a base hit up the middle to knock home the winning run in the 11th inning, as the Pittsburgh Pirates outlasted the New York Mets to earn a 3-2 victory.
Andrew McCutchen scored the deciding run after drawing a walk against Gonzalez Germen (0-1) to start the home 11th, then swiped second as Pedro Alvarez struck out swinging.
Russell Martin was issued a free pass and Gaby Sanchez struck out after going ahead 3-0 in the count, but Mercer lifted the Pirates to victory when his ground ball went just past the diving reach of Omar Quintanilla at short.
Germen, making his major league debut, threw only nine of his 23 pitches for strikes. Kirk Nieuwenhuis hit a solo homer in the seventh to even the game at 2-2.
Vin Mazzaro (5-2) pitched a scoreless inning to pick up the win. Alvarez launched his 24th home run of the year and the Pirates picked up their second straight win on the heels of a four-game slide.
Jeremy Hefner posted another outstanding effort. After surrendering Alvarez's two-run blast in the first inning, he retired the next 14 batters he faced.
"Was trying to go fastball away and caught more of the plate than I would've liked," said Hefner on Alvarez's home run. "If I made a better pitch there, maybe we win the ball game."
He threw only 78 pitches over seven innings, allowing just three hits.
"He definitely settled down real well," said Alvarez about New York's starter.
Charlie Morton also went seven strong innings and was in line to get the win until serving up Nieuwenhuis's blast during his final inning of work. He was charged with two runs on six hits.
The Pirates had a good chance to win it in regulation, but couldn't capitalize.
The Mets used four pitchers to get through the ninth, with Josh Edgin working out of a bases loaded jam that was brought upon by Starling Marte's leadoff double. Sanchez grounded softly to first to end the threat.
Alvarez's 410-foot blast in the first opened a 2-0 lead for the Pirates, but after leaving runners stranded in the fourth and fifth innings, the Mets got on the board in the sixth.
Eric Young Jr. legged out a double with one away on his soft line drive down the third base line. Daniel Murphy was then retired on Mercer's snag at second, but David Wright came through with a bloop single to make it 2-1.
Morton then served up a long homer to Nieuwenhuis with one away in the following frame to tie the score.
It was the 12th extra-inning contest of the season for both teams ... Wright went 2-for-5, extending his hitting streak to 12 games ... In Pittsburgh's last 26 games, they've had only one starter allow more than three runs ... The Pirates acquired first baseman/outfielder Russ Canzler from the Baltimore Orioles in exchange for pitcher Tim Alderson. Canzler was optioned to Triple-A Indianapolis and the Pirates transferred pitcher James McDonald from the 15- day disabled list to the 60-day disabled list.