Hector Sanchez singled in the go-ahead run in the 10th inning, boosting San Francisco to a 4-3 win over the Mets.
Angel Pagan homered against his former team and the Giants scored three third- inning runs, but New York forced an extra frame when Josh Thole's base hit plated the tying tally with one out in the ninth.
Frank Francisco (0-1) walked Melky Cabrera to start the 10th. Cabrera stole second with one out and Nate Schierholtz was intentionally walked with two down. Sanchez then hit a soft line single to center field. The ball was bobbled by Kirk Nieuwenhuis and the throw came to third base with a safe call there.
Sergio Romo gave up singles to Daniel Murphy and David Wright to start the New York 10th. Clay Hensley then got Ike Davis to ground out to second on a ball that shattered the bat, moving both runners into scoring position. Jason Bay struck out to set the stage for Lucas Duda.
He took a called first strike and then fouled off four straight pitches before taking a pair of balls. The left-handed hitter then flied out to center field, securing the first save of the year for Hensley with Romo (1-0) getting the win.
Pagan, who was traded by the Mets to San Francisco in December, homered leading off the third against Jon Niese. Buster Posey had the fourth straight hit for the Giants, an RBI double. Niese's wild pitch then plated Pablo Sandoval.
Bay homered to left with two down in the fourth and Nieuwenhuis went deep the opposite way to left leading off the bottom of the fifth.
Nieuwenhuis made a diving catch at the warning track to end the top of the eighth off a ball hit by Sanchez.
With men on first and second in the ninth, Thole capped his eight-pitch at-bat with a ground single into right field. That snapped a 12-inning scoreless stretch for the San Francisco bullpen.
Sandoval has hit safely in all 13 games this season. His 13-game streak is three shy of the club record held by Willie Mays, accomplished in 1960...The Giants went 2-for-14 with men in scoring position and are 6-for-53 in those situations in their last five games...Wright has a 10-game hitting streak. He also walked twice and has reached base safely at least twice in all 10 games he's played this season, the longest stretch to start a campaign in team history. Wright also has played in 1,116 games, tying Mookie Wilson for sixth place on the club's all-time list...Giants starter Barry Zito lasted five innings, while Niese threw six frames.