PHOENIX (AP) Corbin Carroll took off for third base and Ketel Marte bolted for second. A chaotic 10 seconds followed, with a bang-bang play, a dropped baseball, another dash by Carroll, an errant throw by Wilmer Flores, a scramble home by Marte, and finally, a raucous celebration for the Diamondbacks.

Arizona manager Torey Lovullo admits he wasn't sure what had just happened.

“I blinked my eyes,” he said, “and we had scored a couple runs.”

Carroll and Marte combined for a crucial double steal that led to two runs, Zac Gallen earned his 16th win on the mound and the Diamondbacks won their fourth straight game by beating the San Francisco Giants 8-4 on Tuesday night.

The D-backs remained a half-game in front of the Chicago Cubs for the second of three National League wild-card berths. The Giants, who have dropped four of five, fell three games behind the Cubs for the final playoff spot.

Arizona trailed 2-0 early but took a 5-2 lead in the second inning, partly thanks to that electric double steal. With two outs, Carroll sprinted toward third and Flores couldn't handle catcher Patrick Bailey's throw. The ball trickled away and Carroll scrambled toward home. Flores threw to the plate but misfired, allowing Marte, who started the play by stealing second, to round third and score as well.

“I was like, ‘Oh god, I better make it,’” Carroll said. “Once that ball got away and Ketel scored, too, I was fired up. That felt good.”

It was Carroll’s 48th stolen base of the season. Flores was charged with two errors on the play.

The D-backs pushed their advantage to 7-2 in the fourth on Marte's two-run single, which was part of a four-hit night. Carroll also had two RBIs.

Gallen (16-8) - a contender for the NL Cy Young Award - got the win but labored through five innings, giving up four runs on six hits and three walks. He struck out six.

“I felt fine the first four innings and then I'm not sure what happened in the fifth,” Gallen said. “But my job is to give us a chance to win and the offense kind of bailed me out tonight. Gave me a nice cushion.”

The Giants took a 2-0 lead in the first when LaMonte Wade Jr. led off with a sinking liner that Carroll couldn't corral in right field, allowing Wade to reach third with a triple. Mike Yastrzemski brought home Wade on a sacrifice fly, and Joc Pederson added a solo homer, his 14th of the season.

WEB GEM

Diamondbacks center fielder Alek Thomas made a fantastic catch in the eighth, likely saving a run.

Michael Conforto hit a drive to deep center off reliever Kevin Ginkel, but Thomas made a leaping grab on the warning track for the third out, just before crashing into the wall.

COBB LEAVES EARLY

Giants starting pitcher Alex Cobb (7-7) exited in the third inning after apparently aggravating a left hip injury that's bothered him since mid-June. The righty gave up five runs over the first two innings.

Left-hander Alex Wood entered for Cobb and gave up three earned runs over five innings.

Cobb said the pain became too much to be an effective pitcher.

“You walk off that mound, put your team in the position that they're in during a must-win game, there's no worse feeling,” Cobb said.

ROOF OPEN

The Diamondbacks opened the retractable roof at Chase Field for the first time in months.

The temperature was 95 degrees at first pitch, but cooled off quickly. It's been a particularly brutal summer in Phoenix, with a record-setting 54 days hitting at least the 110-degree mark.

UP NEXT

The teams wrap up their two-game series Wednesday afternoon. The Giants will throw RHP Logan Webb (10-12, 3.31 ERA) and the D-backs will counter with RHP Merrill Kelly (11-7, 3.45).

---

AP MLB: https://apnews.com/hub/MLB

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.