NEW YORK -- A high popup that started twisting in the wind turned the ninth inning into an adventure at Citi Field on Saturday.
In one of the craziest endings imaginable, Ruben Tejada scored the winning run on a throwing error by catcher Buster Posey and the New York Mets beat the bumbling San Francisco Giants 5-4 after blowing a three-run lead moments earlier.
Mike Pelfrey tossed eight terrific innings, outpitching Ryan Vogelsong and helping the Mets build a 4-1 cushion. Emmanuel Burriss hit an RBI single in the ninth, but New York appeared poised to lock up a fairly simple victory when Jon Rauch came out of the bullpen with two outs and got pinch-hitter Brandon Belt to hit a high fly to shallow center.
Tejada had trouble with it immediately, though, fighting to get under the ball behind shortstop as it swirled around in the wind. Rookie center fielder Kirk Nieuwenhuis came rushing in and overran the ball, which dropped behind him for a two-run double.
In the dugout, Mets manager Terry Collins jerked his head down and threw his hands on top of his cap. In the stands, fans stood shaking their heads in disbelief.
"I was coming from a long way out, and it's my ball all the way and I just overran it," Nieuwenhuis said. "I thought it was going to be closer to the infield and it ended up carrying a lot more than I thought."
The mishap brought back painful memories for the Mets, of course. Just a few years ago, second baseman Luis Castillo dropped a similar popup that should have ended a game, allowing the New York Yankees to rally for a comeback victory.
"I had faith in my teammates to pick me up but, at the same time, Pelfrey deserved that win. He pitched a great game, unbelievable," Nieuwenhuis said.
Rauch (2-0) struck out Angel Pagan to keep it tied and Lucas Duda opened the bottom of the ninth with a single off Clay Hensley (1-1). Josh Thole sacrificed and Tejada, who drove in three runs, drew a walk.
Pinch-hitter Justin Turner then hit a grounder to shortstop that could have been an inning-ending double play except that Aubrey Huff, who had just been moved to second base for the first time in his 13-season career, didn't cover the bag.
"My natural instinct my whole life, ball hit to my right, I go to first," Huff said.
Burriss hesitated before making a low throw to first and Turner was called safe on a close play. The infield single loaded the bases for Nieuwenhuis, who hit a grounder to Belt at first.
He threw home for the force and Posey tried for a double play, attempting to hit a moving target in reliever Jeremy Affeldt as he raced over to cover first. But the throw sailed wide into right field and Tejada came all the way around from second, sliding in to snap New York's three-game skid.
Pinch-runner Scott Hairston stuck out his leg in front of the plate while sliding home on the forceout and knocked Posey off balance as he threw.
"Yeah, he clipped my leg," Posey said, adding that he didn't consider it a dirty play at all. "I think it's just going hard."
Looking for an interference call, Posey argued with plate umpire Doug Eddings to no avail.
"At that point, you're just trying to plead your case, for what it's worth," Posey said.
Collins pulled closer Frank Francisco in the ninth after San Francisco cut it to 4-2. Tim Byrdak struck out pinch-hitter Hector Sanchez with two on before Rauch came in looking for his first save with New York.
"I'm going to talk to Frankie tomorrow," Collins said. "He's not happy with what happened, but remember, he's as new at this as anyone else."
Vogelsong matched a career high with eight strikeouts. He went seven innings, yielding three runs and five hits.
San Francisco had won three straight and six of eight.
Tejada's two-run double in the seventh put New York ahead 3-1 and the Mets added an unearned run in the eighth on an infield single by slumping Ike Davis. Huff committed an error at first base earlier in the inning.
Belt stayed in at first after his pinch-hit double and Huff had to shift over to second because backup infielder Ryan Theriot was unavailable due to an illness.
"Desperate times call for desperate measures," manager Bruce Bochy said.
The Giants finished with three errors, giving them 19 in 14 games this season. They came into the day with the most in the majors.
Pablo Sandoval had an RBI single for San Francisco. He has hit safely in all 14 games this season.
Theriot was flying from San Francisco to New York on Saturday but wasn't available off the bench. ... Mets prospect Matt Harvey, drafted seventh overall in 2010, earned his first Triple-A win Friday night. He matched a career high with 10 strikeouts, including Bryce Harper twice. ... Before the game, fans and their dogs paraded around the warning track as part of the Bark in the Park promotion. Attendance was 33,844, plus 429 dogs.