NEW YORK (AP) - Daniel Murphy hit a game-ending RBI single in the ninth inning, Luis Castillo made up for David Wright's absence with a rare two-run homer and the scrappy New York Mets beat the San Francisco Giants 3-2 on Sunday.
All-Star closer Francisco Rodriguez (3-4) struck out the side in the ninth to earn the win, one day after giving up Bengie Molina's homer in the 10th inning of a 5-4 loss.
Castillo connected with two outs in the fifth inning off Jonathan Sanchez for his first homer since May 30, 2008, at Shea Stadium. Left fielder Fred Lewis barely turned around to watch the ball land in the second deck of spacious Citi Field, giving New York a 2-1 lead.
The Giants answered with a run in the eighth before the Mets put together the winning rally.
Jeff Francoeur opened the ninth with a single off Sergio Romo (3-2) deep into the hole at shortstop, hustling down the line to beat the throw to first. Fernando Tatis followed with a perfect sacrifice, and Murphy roped a clean single to right field.
Francoeur slid in ahead of the tag from catcher Eli Whiteside to give the banged-up Mets their third win in four games, and a big lift after Wright was sidelined by Saturday's scary beaning.
New York's All-Star third baseman was released from the hospital Sunday morning, about 18 hours after sustaining a concussion when was hit in the helmet by a 94 mph fastball from San Francisco's Matt Cain. Wright was still experiencing "post-consussion symptoms," a team spokesman said, and was not at the ballpark for Sunday's game.
When asked if Wright could miss the rest of the season, New York manager Jerry Manuel said it's "a possibility" depending on how further tests come out. The Mets placed Wright on the disabled list after Sunday's dramatic win.
Mets starter Mike Pelfrey and his counterpart Sanchez matched each other nearly pitch for pitch, and neither got anything to show for it.
Pelfrey allowed two runs and five hits over 7 1-3 innings, striking out eight in another strong start against the Giants. The big right-hander has allowed only four runs in three tries against them covering 20 1-3 innings, but has just one win to show for it.
Sanchez worked around four walks and four hits to last seven innings. He struck out seven and still has only one victory in 13 road starts.
Whiteside singled in the fifth and moved up on a well-placed bunt by Sanchez, eventually scoring when Eugenio Velez hit a two-out single through the left side of the infield.
Pelfrey cruised after that, retiring eight straight batters before the Giants rallied to tie it at 2. Velez hit a two-out double in the eighth and slumping Randy Winn followed with an RBI double. After an intentional walk to Pablo Sandoval and a carousel of pinch hitters and pitching changes, Pedro Feliciano stopped the threat by getting Ryan Garko to line out.
NOTES: Giants 3B Sandoval ran into the railing of the camera pit near the dugout chasing a foul ball in the eighth inning. He was tended to by team trainers but remained in the game. ... Pelfrey has won only once since July 12. ... Sanchez has walked at least three batters in 15 of 20 starts this season. ... Mets RHP Livan Hernandez faces Giants RHP Joe Martinez in the series finale Monday.