SAN FRANCISCO (AP) Madison Bumgarner had stymied the New York Mets over the years with his pitching. This time, the Giants' ace turned the tables and delivered the big blow with his bat.
At this point, manager Bruce Bochy's ballclub will take a win however it comes.
Bumgarner hit a go-ahead two-run homer off Jacob deGrom in the fourth inning - moments after giving up a grand slam - and San Francisco came back from four runs down to beat the Mets 10-7 on Thursday night.
Bumgarner, who narrowly missed a home run in his first at-bat, hit a 2-2 pitch into the stands in left field to cap a five-run inning when the Giants batted around. It was Bumgarner's third home run this season and the 14th of his career.
''I don't know if anybody's ever going to say they're comfortable against (deGrom) but for whatever reason I was seeing the ball a little better today,'' Bumgarner said. ''With the RBI situations I've had the last few games, I wanted to shorten up and just try to make contact.''
The highly anticipated matchup between pitchers with two of the five lowest ERAs in the majors wound up being a slugfest.
San Francisco and New York combined for 17 runs and 30 hits.
''I didn't see that kind of game coming,'' Bochy said. ''You had two good ones out there and they just weren't on top of their game.''
New York had taken a 4-0 lead in the fourth on Justin Ruggiano's second career grand slam in his first game back off the disabled list.
San Francisco bounced back with three runs in the bottom of the inning before Bumgarner's home run.
The home run helped overcome a shaky outing by San Francisco's four-time All-Star. Bumgarner (12-7) allowed four runs over five innings and struck out six.
''It was kind of rough the whole game,'' Bumgarner said. ''Location wasn't that good. Even when we were throwing strikes in the zone, the strikes weren't located how I'd want to.''
DeGrom (7-6) had allowed only two earned runs over his previous 27 2-3 innings before giving up career-highs in runs (8) and hits (13). He struck out five and walked one in losing to the Giants for the first time in four starts.
''It seemed like everything I threw went right down the middle,'' deGrom said. ''Tonight's on me. I was terrible.''
Eduardo Nunez had four hits and three RBIs for San Francisco, Brandon Crawford and Denard Spann added three hits apiece while Joe Panik drove in two runs.
Six Giants pitchers combined to retire the final 12 batters. Santiago Casilla worked the ninth for his 28th save.
San Francisco ended a four-game losing streak and pulled within one-half game of the first-place Dodgers in the NL West. Los Angeles lost to Philadelphia earlier Thursday.
Travis d'Arnaud and T.J. Rivera had two hits apiece for the Mets.
New York scored three times in the sixth to pull to 8-7 then loaded the bases with two outs in the seventh before Derek Law got Ty Kelly to ground out.
Buster Posey hit a two-run double in the eighth to give the Giants breathing room.
It was Bochy's 1,769th career win, tying him with long-time Pirates and Tigers manager Jim Leyland for 15th on the all-time list. ''I'm humbled to even reach this milestone with somebody who's done so much for the game and was one of the best managers ever in the game,'' Bochy said.
Bumgarner is the second pitcher in the modern era to allow a grand slam then hit a go-ahead home run in the same inning, according to EliasSports. Hal Jeffcoat did it with the 1957 Cincinnati Reds.
Mets: SS Asdrubal Cabrera (strained left patella tendon) and OF Yoenis Cespedes (strained right quad) are expected to join the team Friday. ... 2B Neil Walker (lower back) missed his third straight game. ... RHP Gabriel Ynoa was optioned to Triple-A Las Vegas.
Giants: RHP Matt Cain was placed on the 15-day DL with a lower back strain. RHP Cory Gearrin was activated off the DL.
Mets: RHP Seth Lugo (0-1) will make his first start of the season Friday in place of Steven Matz. Matz was scratched late Thursday with shoulder soreness..
Giants: RHP Johnny Cueto (13-3) pitches for San Francisco looking to end a six-game winless stretch.