SAN FRANCISCO — Just when it looked like the Giants were headed to another loss in what has become quintessential fashion this season, they pulled out the time machine for some of last year’s ninth-inning magic.
After mammoth solo shots from Joey Bart and Darin Ruf against the Brewers’ All-Star closer Josh Hader that pulled them within one in the bottom of the ninth, Mike Yastrzemski delivered the big blow — maybe the biggest this season — with a walk-off grand slam that sent the Giants home winners, 8-5.
Their ninth-inning rally gave the Giants their first win in 37 tries this season when trailing after eight innings.
Austin Slater, who scored from third base on Yastrzesmki’s grand slam, was caught between first and second on a pick off but beat the throw to second. Yermín Mercedes reached when Hader hit him with a pitch. And Slater poked a blooper into right to bring up Yastrzmeski.
For once, the bounces this season went the Giants’ way.
All of the Brewers’ five runs came in a disaster of a fifth inning that replicated so many of the faults that had led to losses during their stretch of baseball that dropped them 13.5 back of the division lead and out of playoff position.
Despite recording his sixth and seventh strikeouts of the night to start the inning, Alex Wood would not finish the fifth, and the Brewers would eventually bat around while scoring five runs — only two of which were earned.
LaMonte Wade Jr. made the critical error on Christian Yelich’s hopper to first, after two Brewers reached on infield singles. The grounder hit off his glove, then off second baseman Thairo Estrada’s glove, and both runners rounded the remaining bags amid the chaos.
After being squeezed on a potential strike three that led to a walk, the reliever called on to get the Giants out of the mess, Tyler Rogers, proceeded to allow a two-run double to Andrew McCutchen, then issued a bases-loaded walk that capped the disastrous frame. The Brewers brought 11 men to the plate — nine of them after making the first two outs.
After setting a season-high with eight strikeouts over seven shutout innings in his last start, Wood came one shy of matching that total through 4⅔ on Friday. Before the two infield singles and the error, Wood had retired 14 of the past 15 batters he faced since Yelich led off the game with a single. He was at 84 pitches when manager Gabe Kapler came out with the hook.
Because Wade’s error led to all three of Wood’s runs being unearned (Rogers’ two were both earned), Wood lowered his season ERA to 4.20. In three July starts, Wood has tossed 16⅔ innings and allowed one earned run — a 0.54 ERA.
Adding insult — thankfully no injuries — rookie third baseman David Villar collided with shortstop Brandon Crawford on a routine infield pop-up that fell to the dirt in the sixth, after Villar ranged well into Crawford’s territory.
After a one-run loss in extra innings to open this series, the Giants pulled out their own come-from-behind win on Friday.
Before their implosion in the fifth, Villar gave the Giants a glimmer of hope defensively in the early innings Friday, nabbing a 99-mph line drive for the first out of the third, then charging and barehanding a ground ball for the final out.
Wade snapped a 5-for-41 slump since returning from the injured list with a second-inning triple that gave the Giants a 2-0 lead. Villar reached via a hit-by-pitch, Joey Bart followed with a single, and Wade drove them both home with a 389-foot triple that met its match in the 415-foot alley in right-center field.
Mauricio Llovera, who recorded five outs without allowing a run between the sixth and the seventh, walked off the mound with head trainer Dave Groeschner and left the game with an undisclosed injury — a possible blow to a bullpen already on fumes. Every reliever has appeared in at least one of the past three games — Camilo Doval, John Brebbia and Jarlín Garcia on both Wednesday and Thursday — and Kapler said a few of his bullpen arms were unavailable Friday.