Mark J. Rebilas-USA TODAY Sports

The Arizona Diamondbacks scored three runs in the bottom of the eighth inning, taking advantage of four walks, to beat the Cincinnati Reds 5-2 on Sunday at Phoenix.

The Diamondbacks took three of four games of the series against the Reds and have won 12 of their last 15 games.

Arizona loaded the bases to start the bottom of the eighth inning after Corbin Carroll and Ketel Marte walked off Ian Gibaut (8-3) and Tommy Pham was issued a walk by Lucas Sims.

Christian Walker followed with a sacrifice fly to center field that brought Carroll home.

Carroll stole second base, his 40th of the season, before Marte and Pham walked.

He is the fourth rookie in major league history to achieve at least 20 home runs and 40 stolen bases in a season. Mike Trout (2012), Mitchell Page (1977) and Tommy Agee (1966) are the others.

After Lourdes Gurriel Jr. was walked by Sims to load the bases once again, Evan Longoria scored Marte with a sacrifice fly to left field.

Alek Thomas followed with a single that scored Pham to give Arizona a 5-2 lead.

Ryan Thompson, whose contract was selected by the Diamondbacks from Triple-A Reno earlier Sunday, retired the side in the ninth for the save.

Scott McGough (2-7) won the game in relief, striking out three in 1 2/3 innings.

Arizona rookie right-hander Slade Cecconi, who allowed one hit through the first five innings, gave up consecutive singles to Will Benson and Tyler Stephenson in the top of the sixth inning.

Friedl followed with a sacrifice fly to center field that scored Benson and tied the game at 1.

Cecconi struck out the next batter before he was relieved by Joe Mantiply. He struck out five batters with no walks in 5 2/3 innings.

Cincinnati took a 2-1 lead with two outs in the seventh inning on Noelvi Marte's RBI single.

Gurriel led off the seventh inning with a home run off Cincinnati starter Graham Ashcraft to tie the game at 2. It was his 20th homer of the season.

More must-reads:

TODAY'S BEST
Pirates release veteran right-hander
Steelers sign second-round OL, complete rookie signings
Hurricanes reportedly looking to fill vacant GM role internally
WNBA experienced viewership and attendance surge in May
MLB players name the ‘most overrated player’ in the league
White Sox catcher undergoes season-ending surgery
Report: Lakers HC job viewed negatively within NBA
One player makes bizarre choice for 'most overrated' colleague
Patriots legend addresses if Drake Maye should sit as a rookie
Steelers extend HC Mike Tomlin
Former Lakers HC lands intriguing, familiar gig
Dan Hurley has made a decision on coaching future
Scottie Scheffler broke one of his own records Sunday at the Memorial
Rick Pitino shares whether he thinks Dan Hurley will leave UConn
Former Pro Bowl returner earns tryout with Jets
Aaron Judge upset with Yankees fans during series finale against Dodgers
Watch: Kyrie Irving has message for Celtics fans after Game 2 loss
Jordan Love believes Packers 'don't have to have a No. 1 receiver'
Umpiring blunder mars classic French Open final
Celtics stars don't have to be at their best for team to win NBA title