Mike Pelfrey pitched into the eighth inning against San Francisco's limited lineup, Carlos Beltran homered and the New York Mets averted a Giants sweep with a 5-2 win Thursday.
San Francisco loaded the bases with one out in the ninth against Francisco Rodriguez, but Miguel Tejada struck out and pinch-hitter Buster Posey grounded out.
Jose Reyes lined a two-run triple and the Mets took advantage of more wildness from Jonathan Sanchez (2-2) to win for the second time in seven games.
Pelfrey (2-3), expected to be the Mets' ace while injured Johan Santana recovers this year, began the day with a 7.39 ERA. He gave up one earned run and four hits in 7 2-3 innings.
Rodriguez got four outs and hung on for his seventh save.
The Giants were trying to sweep the Mets for the first time since 2002. But they also were finishing up a stretch where they played 16 of 19 games on the road, and hardly looked like the defending World Series champions.
Posey and Pat Burrell did not start and Freddy Sanchez sat with a sore right thumb. Minus several other injured players, the Giants slipped back under .500 at 15-16.
Mike Fontenot homered with two outs in the fourth for San Francisco's first hit. The Giants' fill-in No. 3 hitter sent a drive into the second deck in right field — a fan up there made a hefty heave, tossing the souvenir nearly all the way back to first baseman Ike Davis. An inning earlier, Mets second baseman Chin-lung Hu missed Davis by nearly 10 feet with a wild throw on a routine play.
Known for his shaky control, Sanchez walked six while giving up five runs and five hits in five innings. Beltran hit a two-run homer in the fifth for a 5-2 lead.
The Mets scored three times in the second, taking advantage when Sanchez couldn't find the strike zone and San Francisco outfielders couldn't corral the ball.
Jason Bay, fresh off the paternity leave list, opened with a double that bounced from the glove of diving left fielder Cody Ross. Davis followed with a looper that fell a step in front of Ross for a single.
Ronny Paulino's double-play grounder scored a run and Sanchez walked Scott Hairston — batting .176 this season — and Pelfrey, a career .090 hitter. Jose Reyes followed with a liner that skipped just beyond center fielder Aaron Rowand for a two-run triple and a 3-0 lead.
A day after his name surfaced in a Mets-to-Giants trade rumor, Reyes had a mixed afternoon. The All-Star shortstop streaked around the bases on his triple, but argued after being called out on strikes to end the fourth, then made a throwing error on the first play in the fifth.
Sanchez was all around the plate with his pitching and hitting, and that wasn't always a good thing for him.
Along with his early walks, Sanchez stood in the batter's box after trying to put down a sacrifice bunt, thinking it was foul — he looked at plate umpire Eric Cooper while the Giants turned an easy double play.
Sanchez hit an RBI single the next time up.
NOTES: All five of Beltran's home runs this season have come at Citi Field. ... Fontenot hit one homer in a combined 240 at-bats last year with the Giants and Cubs. ... The last 13 Giants games have been decided by three runs or fewer. ... Pelfrey and Ross each took big swings and helicoptered bats into the front row behind San Francisco's third-base dugout. No one was hurt. ... Dodgers star Andre Ethier brings his 29-game hitting streak into Citi Field on Friday night. Jonathon Niese starts for the Mets.