Michael Morse hit an RBI single with one out in the ninth inning after Hunter Pence's tying double, and the Giants rallied to beat the New York Mets 5-4 Saturday night to extend baseball's best record.
''It just tells you what kind of team we have,'' said Morse, who helped teammates tear off his jersey during a wild celebration on the infield. ''We find a way.''
Angel Pagan had three singles, two RBIs and got on base all five times against his former team. He reached leading off the ninth when catcher Anthony Recker dropped the third strike and his throw pulled Lucas Duda off first base. Mets manager Terry Collins challenged the play but lost.
Pence hit a double that scored Pagan and advanced to third on Buster Posey's deep fly to left-center. After Jenrry Mejia (1-2) intentionally walked Pablo Sandoval, Morse sent a single to deep right and was mobbed by teammates before he reached second.
San Francisco improved to 6-0 at home when Hudson starts.
''I'm as proud of this game as I have been of any of them,'' said Hudson, who allowed season highs of nine hits and three walks in five innings. ''Even though it was probably my worst game from a pitching standpoint, these kinds of games are very satisfying because these are the games that most of the time your teams lose when your starting pitcher goes out there and doesn't really have his stuff. We were able to battle and win. That's the mark of a championship club.''
It was Mejia's first blown save in seven chances. The Mets have lost five straight.
Jeremy Affeldt (2-1) tossed one scoreless inning to help the Giants (41-21) win for the ninth time in 11 games.
Bartolo Colon gave up three runs - one earned - and eight hits in 5 2-3 innings for the Mets. The 41-year-old, who spent the past two seasons across the bay in Oakland, struck out four and walked two.
Hudson, who began the game with a majors-best 1.75 ERA, is the first pitcher in San Francisco history with an ERA below 2.00 through his first 12 starts with the team. Even with the tough outing, Hudson's ERA is 1.97.
The Mets grabbed leads of 3-0 and 4-1, but stranded 12 runners on base.
''We did a good job of limiting the damage,'' Giants manager Bruce Bochy said.
The Mets ended Hudson's scoreless streak at 16 consecutive innings in the second, when Duda doubled and scored on Recker's single. In the third, Duda broke his bat hitting an RBI single off the wall in right and Recker drove in another run to give the Mets a 3-0 lead.
The Mets might have had more if not for a baserunning blunder. Ruben Tejada was tagged out between second and third after Duda stopped at third and Recker ran to second.
With the bases loaded and no outs in the fifth, Posey grounded into a double play to score San Francisco's first run. Colon then got Sandoval to fly out.
Wright fielded a grounder and misfired to second trying to get the lead runner with two outs. Pagan followed with a two-run single to bring the Giants within 4-3 and chase Colon.
Pence's single loaded the bases for Posey again, but Jeurys Familia struck out Posey on a sinking fastball clocked at 96 mph.
Giants reliever Santiago Casilla, who is on the disabled list with a strained right hamstring, threw 30 pitches in the bullpen. He is scheduled to throw again before Monday's game and could begin a rehab assignment as soon as Wednesday. ... The Mets optioned C Travis d'Arnaud to Triple-A Las Vegas after the game and called up C Taylor Teagarden. ... Collins said Wright, who has started the first 62 games this season, will likely get Sunday off. The Mets don't play Monday. ... Former Giants prospect Zack Wheeler takes the mound for the Mets against San Francisco's Tim Lincecum (4-4, 5.01 ERA) in Sunday's series finale.