Buster Posey's baserunning skills played a big part in the Giants keeping their latest winning streak going.

LaMonte Wade Jr. scored the winning run from third with two outs in the ninth inning when first baseman Christian Walker was unable to handle Kris Bryant's sharp grounder, and San Francisco's players danced on the field Tuesday night celebrating an 8-7 victory over the Arizona Diamondbacks.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Walker was charged with a tough error that gave the NL West-leading Giants their third straight win and fifth in six games. They earned this one the hard way after going up 5-0 in the fifth inning of a game matching the top team in the majors against the worst.

Brandon Crawford hit a go-ahead double in the eighth and 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."

"That was most definitely sarcasm," Posey said. "I was just happy that I made it there."

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.

Matt Peacock (5-7) took the loss.

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.

"You see the trend of the game. The pitch count's one thing — you don't necessarily see guys go above 110. I feel like a few years ago that was more commonplace. Teams are building their bullpens," Gallen said, noting it was still "shocking" to hear.

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

CLICK HERE TO GET THE FOX NEWS APP

WOTUS' MARK

Longtime Giants coach Ron Wotus, currently stationed at third base, earned his 2,000th victory with the franchise.

"He's one of the best," Posey said.

The team toasted him afterward and Wotus said, "I'm honored that they're even acknowledging it."

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.

"Bum did incredible things here and will always be beloved," Posey said. "It was cool to see him get that ovation."

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.