SAN FRANCISCO (AP) — LaMonte Wade Jr. scored the winning run with two outs in the ninth inning when first baseman Christian Walker failed to handle Kris Bryant's sharp grounder, and the San Francisco Giants danced on the field celebrating an 8-7 victory against the Arizona Diamondbacks on Tuesday night.

The Giants won their third straight and fifth in six games, doing it the hard way after going up 5-0 in the fifth.

Brandon Crawford hit a go-ahead double in the eighth and Buster Posey homered. After scoring from first on Crawford's hit, Posey came up from his feet-first slide smiling and told Bryant, “I'm so fast.”

Asdrúbal Cabrera tied the game with a two-run homer in the Diamondbacks' five-run sixth. Arizona produced three straight doubles to rally and five extra-base hits in all that inning, capped by Cabrera's seventh homer.

Crawford came through against Joe Mantiply and later scored on an error before Jake McGee blew the save, allowing his first earned runs since May 30. He issued a bases-loaded walk to pinch-hitter Josh VanMeter and gave up a tying sacrifice fly to Nick Ahmed before Zack Littell (1-0) relieved.

Bryant hit an RBI double in the first and Mike Yastrzemski followed with a two-run double that made it 3-0 as Zac Gallen received an early mound visit. Posey connected in the fifth for his 14th homer and glanced at the Arizona dugout, perhaps looking for old pal Madison Bumgarner.

Brandon Belt doubled in the first to extend his career-best hitting streak to 14 games and scored on Bryant’s hit as San Francisco got going.

But starter Alex Wood couldn't hold a five-run lead. He had been in line to reach double-digit wins for the first time since a career-high 16 victories in 2017 for the Dodgers.

Gallen's winless stretch is now 11 starts in which he's 0-6 since a victory at Atlanta on April 25.

With a full slate of games, no starting pitchers in the majors Tuesday went more than six innings for the first time in major league history, according to STATS.

Diamondbacks second baseman Josh Rojas was 0 for 4 with three strikeouts after coming off the injured list from a dislocated left finger.

He hit three home runs in his final rehab game Sunday for Triple-A Reno in a win over Tacoma.

“That was a good day. I needed that,” Rojas said, smiling.

SALUTE TO MADBUM

Bumgarner made his first trip back to Oracle Park with fans in the stands since the star pitcher and 2014 World Series MVP left the Giants after the 2019 season to join Arizona on an $85 million, five-year contract following 11 years with the Giants.

He was recognized on the big screen in the middle of the second. Bumgarner, clearly touched by the warm ovation, hopped the dugout railing, waved and put his hand on his heart in appreciation.

TRAINER'S ROOM

Diamondbacks: RHP Noé Ramirez has been cleared from the COVID-19 injured list to resume baseball activities at Salt River Fields after being out since July 30. OF Stuart Fairchild, also sidelined by the coronavirus, was one day behind Ramirez's schedule and should be cleared soon, manager Torey Lovullo said. Ramirez still must go through some of the Diamondbacks' protocols in the next 24 hours or so. ... RHP Luke Weaver, working back from a strained rotator cuff in his pitching shoulder, threw three innings and 48 pitches in a start Monday for the club's rookie ball affiliate and allowed four hits while striking out six. He played catch Tuesday and is set to pitch again Friday. ... LHP Caleb Smith (3-8, 5.48 ERA), who had started regularly since June 1, is moving back to the bullpen. He has made 31 appearances in 2021 with 13 starts.

Giants: 3B Evan Longoria's timetable for a return remains unclear as he works back from a sprained left shoulder he injured July 5 in a collision with Crawford. Longoria still could need more minor league at-bats. “Before we make the decision to activate him, we want the assurance that he feels good to go. We're just not quite there yet,” manager Gabe Kapler said. “We don't have anything immediate planned beyond letting him recover today."

ROSTER MOVES

Giants: San Francisco recalled RHP Camilo Doval from Triple-A Sacramento and optioned RHP John Brebbia to Sacramento.

Diamondbacks: Arizona released OF Josh Reddick during Monday's off day after he was designated for assignment last Thursday. INF Jake Hager was optioned to Reno after Sunday's game at San Diego.

UP NEXT

RHP Merrill Kelly (7-8, 4.13) pitches Wednesday for the Diamondbacks after going 5-1 with a 2.44 ERA over his last nine starts since June 21. The Giants counter with All-Star RHP Kevin Gausman (10-5, 2.31), who will try to win consecutive starts for the first time since May 30 and June 5. He went on emergency family leave last month as wife Taylor dealt with pregnancy complications before delivering a healthy baby girl.

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports