Updated

SAN FRANCISCO (AP) — Ike Davis doubled home the go-ahead run in 10th inning after the Mets wasted a two-run lead in the ninth, and New York beat the San Francisco Giants 4-3 Sunday to avoid a four-game sweep.

Pinch-hitter Travis Ishikawa hit a tying, two-run single in the ninth inning, but he was thrown out at the plate on an infield chopper as the potential winning run. Replays showed Ishikawa appeared safe as he slid into home.

Giants closer Brian Wilson (2-1) got the first two outs of the 10th before giving up Jason Bay's third single of the game. Davis, who also drove in a run in the eighth, doubled high off the right field wall for the go-ahead run.

Mets closer Francisco Rodriguez (3-2) blew his fourth save in 26 chances — and wasted a stellar start by Johan Santana — but earned the win when Davis delivered.

The 10th wasn't easy for Rodriguez either. He gave up a two-out double to Edgar Renteria and intentionally walked Juan Uribe before striking out Eli Whiteside on a full-count pitch to end the game.

David Wright led off the fourth inning with his 15th home run of the season.

Santana had his 16-inning scoreless streak snapped in the first when Buster Posey hit a sacrifice fly to give the Giants a 1-0 advantage. But that was all he allowed, giving up eight hits and one walk. He struck out five.

Santana has still allowed a mere two runs over his last 31 innings for an 0.56 ERA.

Rodriguez walked Pablo Sandoval and gave up a single to Uribe to start the ninth. After Whiteside sacrificed the runners up a base, Ishikawa delivered his hit, scoring Renteria, pinch running, and Uribe.

Andres Torres followed with a double, sending Ishikawa to third. Freddy Sanchez hit a short chopper to Wright, who threw high to Henry Blanco, who made the tag.

Wright took over sole possession of fourth place on the Mets' all-time home run list with 156, breaking a tie with Dave Kingman. Bay finished 3 for 5 after going 3 for 28 over his previous eight games.

Sanchez and Aubrey Huff each had two hits for the Giants, who lead the majors in runs scored this month.

Giants starter Jonathan Sanchez allowed two runs on six hits over seven innings. He walked one and struck out five.

NOTES: Wright took a hard grounder off the side of his right knee in the sixth but stayed in the game after walking it off. He has hit safely in 11 of his last 13 games. ... Posey extended his hitting streak to 12 games with a single to lead off the sixth. ... INF Luis Castillo (bruised right heel) will join the Mets in Phoenix on Monday, when INF Jose Reyes is also expected to return to the lineup after missing five games with a sore side. ... Giants RHP Chris Ray has allowed five of the last seven hitters he's faced to reach base. ... Ishikawa has a batting average of .478 (11 for 23) as a pinch hitter.