NEW YORK -- Kirk Nieuwenhuis didn't exactly make up for his mistake in the top of the ninth inning.
But the New York Mets center fielder watched the San Francisco Giants make a pair of their own in the bottom of the inning to overshadow his misplay as the Mets squeezed out a 5-4 win in their last at-bat.
For the second straight game, a ninth-inning lead was not safe between the teams, but this time the Giants erased a 4-1 deficit in the ninth. A night after watching the Mets rally in the ninth before winning the game in the 10th, San Francisco used a major miscue by Nieuwenhuis to score two runs and tie the game in the top of the ninth.
But the Mets won it with their own rally, capped by a bobble by shortstop Emmanuel Burriss and a throwing error by catcher Buster Posey on Nieuwenhuis' fielder's choice.
As Posey's throw on an attempted inning-ending double play sailed into right field, Ruben Tejada came home with the winning run and the Mets celebrated an ugly, topsy-turvy victory.
The Mets used a single by Lucas Duda, a one-out walk by Tejada to put runners on first and second with one out for pinch-hitter Justin Turner.
Turner then grounded a possible double play ball to Burriss at short, but he bobbled the ball when trying to throw to second, then threw to first, but Turner beat it out for an infield hit.
Nieuwenhuis, who inexplicably overran what would have been the game-ending out in center in the top of the inning, then hit a grounder to first, where Brandon Belt fired home for the second out.
Posey then attempted to get Nieuwenhuis at first for an inning-ending double play, but the ball flew into right to end the game.
In the top of the ninth, the Mets seemed set to blow the game, as they gave up a three-run lead and a shot for Mike Pelfrey to earn his first win of the season.
The Mets seemed in command, thanks to a 4-1 lead and Pelfrey's eight innings of six-hit, one-run ball.
But closer Frank Francisco started the ninth by allowing a single to Buster Posey and issued a one-out walk to Nate Schierholtz, before Burriss singled in a run to make it 4-2. In came Tim Byrdak, who struck out Brandon Crawford for the second out.
He seemingly ended the game on a fly to shallow center by pinch-hitter Belt, but Nieuwenhuis over ran the ball, before extending his glove behind him in vain.
A day after getting lauded for his spectacular diving catch in deep center, the rookie seemed set up to become the goat.
Instead, the Mets rallied in the bottom of the ninth.
The Mets had taken the 4-1 lead on a two-run double by Tejada in the seventh and an RBI single by Ike Davis in the eighth that comically eluded reliever Javier Lopez and then-shortstop Crawford.
The Mets also seemed to have gained an edge by a questionable move from Giants manager Bruce Bochy, who did not pinch-hit for starter Ryan Vogelsong in the top of the seventh. Having thrown 95 pitches, the starter struck out to end the inning with a runner on second with the score tied, 1-1.
Vogelsong tied a career-high with eight strikeouts and allowed three runs on five hits in seven innings, but gave up two runs in the bottom of the seventh.
Bochy's decision, which likely took into consideration the fact that San Francisco used five relievers in Friday's game, might not have looked as bad later, as the Giants ended up using four relievers, with Clay Hensley taking the loss.
Earlier, Pelfrey made it tough on the Giants in general.
The righty lowered his ERA to 2.29 after allowing a run in the third on a double by former Met Angel Pagan and a RBI single by Pablo Sandoval, and little else.
Vogelsong did almost as good a job, but the decision to leave him in immediately backfired on Bochy, who watched the starter give up two runs in the seventh to make it 3-1.
NOTES: Nieuwenhuis moved to the leadoff spot from the bottom part of the order Saturday. Manager Terry Collins said he moved the hot-hitting left-handed batter to break up what would have been three straight lefties at the bottom of the lineup. ... Davis started the season hitting .140 entering Saturday's game and Collins would have like to take the pressure off him, but said Davis' fellow slumping sluggers didn't offer the chance to do so. "I'd move him and let him relax, but I don't have anybody else I can put in that spot either," Collins said. ... 3B David Wright remained tied with Darryl Strawberry for first on the Mets' all-time RBI list with 733. ... Giants INF Ryan Theriot was too sick to travel to meet the team Friday, as had been expected, Bochy said before Saturday's game. He was scheduled instead to arrive Saturday and could be available in an emergency, Bochy said. ... 3B Pablo Sandoval extended his hitting streak to 14 games, the second-longest to begin a season in San Francisco history, behind Willie Mays' 16-game streak in 1960, according to STATS, LLC.