Pinch-hitter Jake Lamb had a tiebreaking two-run single in the sixth inning and the Arizona Diamondbacks held on to beat the Colorado Rockies 8-7 Tuesday night.

The Diamondbacks scored five runs in the sixth off Colorado starter Kyle Freeland (3-11) and reliever Bryan Shaw. Three batters after Lamb's hit, Eduardo Escobar had a two-run triple off Shaw.

More Images
Colorado Rockies third baseman Nolan Arenado tries to field a ball hit by Arizona Diamondbacks' Adam Jones during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. Jones reached on an error by Arenado. (AP PhotoRick Scuteri)

Pinch-hitter Jake Lamb had a tiebreaking two-run single in the sixth inning and the Arizona Diamondbacks held on to beat the Colorado Rockies 8-7 Tuesday night.

Colorado Rockies shortstop Trevor Story makes the off-balance throw for an out on a ball hit by Arizona Diamondbacks' Alex Young during the third inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Nick Ahmed homered and drove in two runs. He set a career high for home runs with his 17th and matched his career-best RBI total with 70. Ahmed has six home runs in his last 10 games.

Arizona Diamondbacks' Nick Ahmed watches his RBI sacrifice fly against the Colorado Rockies during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

David Peralta had three hits, Young lasted six innings with three runs allowed and Archie Bradley got his sixth save.

Colorado Rockies' Nolan Arenado watches his two-run home run against the Arizona Diamondbacks during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Nolan Arenado homered in his 1,000th career game for the Rockies, and Trevor Story had four hits and two RBIs

Colorado Rockies shortstop Trevor Story (27) flips the ball to Ryan McMahon to force out Arizona Diamondbacks' Jake Lamb on a ball hit by Ketel Marte, who was safe during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. A run scored. (AP PhotoRick Scuteri)

STRANGE THINGS

Colorado Rockies' Raimel Tapia reacts after hitting a single in the seventh inning during a baseball game against the Arizona Diamondbacks, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

The Rockies' Daniel Murphy hit a ground rule double in the sixth because the ball got stuck under the padding of the right field foul pole.

Arizona Diamondbacks' Carson Kelly and Archie Bradley (25) celebrate after the Diamondbacks defeated the Colorado Rockies 8-7 during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

The Diamondbacks called up infielder Ildemaro Vargas from Triple-A Reno before Tuesday's game after they optioned pitcher Bo Takahashi to Double-A Jackson following Monday's game.

Colorado Rockies' Trevor Story watches his RBI single against the Arizona Diamondbacks during the seventh inning of a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Rockies: RHP Jon Gray (11-8, 3.84 earned run average) is scheduled to start the series finale against Arizona, and is coming off eight scoreless innings of five-hit ball in his last start, Aug. 16 against Miami.

Colorado Rockies left fielder Raimel Tapia makes a running catch for the out on a ball hit by Arizona Diamondbacks' Christian Walker during the fifth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies left fielder Raimel Tapia makes a running catch for the out on a ball hit by Arizona Diamondbacks' Christian Walker during the fifth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Escobar became the third player in Diamondbacks history with 20-plus doubles, 20 or more home runs and at least 10 triples in a season, joining Steve Finley (1999 and 2003) and Stephen Drew (2008). He also became the first National League switch-hitter with 100 RBIs since Chase Headley accomplished the feat with the San Diego Padres in 2012.

Colorado Rockies third baseman Nolan Arenado tries to field a ball hit by Arizona Diamondbacks' Adam Jones during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. Jones reached on an error by Arenado. (AP PhotoRick Scuteri)

Colorado Rockies third baseman Nolan Arenado tries to field a ball hit by Arizona Diamondbacks' Adam Jones during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. Jones reached on an error by Arenado. (AP PhotoRick Scuteri)

Nick Ahmed homered and drove in two runs. He set a career high for home runs with his 17th and matched his career-best RBI total with 70. Ahmed has six home runs in his last 10 games.

Arizona's 34 home runs against the Rockies is a franchise record against an opposing team in a season.

Lamb, batting for starting pitcher Alex Young (5-3) with one out and the bases loaded, bounced a hit through the middle to drive in two runs, and Ketel Marte followed with an RBI on a fielder's choice ahead of Escobar's triple.

Colorado Rockies shortstop Trevor Story makes the off-balance throw for an out on a ball hit by Arizona Diamondbacks' Alex Young during the third inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies shortstop Trevor Story makes the off-balance throw for an out on a ball hit by Arizona Diamondbacks' Alex Young during the third inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

David Peralta had three hits, Young lasted six innings with three runs allowed and Archie Bradley got his sixth save.

Bradley gave up a run in the ninth inning after Charlie Blackmon led off with a double.

The Diamondbacks stayed within striking distance for a NL wild card, four games behind the Chicago Cubs.

Arizona Diamondbacks' Nick Ahmed watches his RBI sacrifice fly against the Colorado Rockies during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Arizona Diamondbacks' Nick Ahmed watches his RBI sacrifice fly against the Colorado Rockies during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Nolan Arenado homered in his 1,000th career game for the Rockies, and Trevor Story had four hits and two RBIs

The Rockies led 2-1 in the top of the fourth after Arenado's 31st home run of the season, a two-run shot. Down 8-3, Colorado rallied with three runs in the seventh, but couldn't catch up.

Freeland left the game with one out in the bottom of the sixth with what appeared to be a leg injury. He allowed three earned runs on five hits.

Colorado Rockies' Nolan Arenado watches his two-run home run against the Arizona Diamondbacks during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies' Nolan Arenado watches his two-run home run against the Arizona Diamondbacks during the fourth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

STRANGE THINGS

Peralta stumbled in left field and fell as he set up to throw the ball to the infield on Tapia's fifth-inning single.

It didn't cost the Diamondbacks for the moment, and Peralta smiled as he got to his feet and waved to the cheering crowd.

Colorado Rockies shortstop Trevor Story (27) flips the ball to Ryan McMahon to force out Arizona Diamondbacks' Jake Lamb on a ball hit by Ketel Marte, who was safe during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. A run scored. (AP PhotoRick Scuteri)

Colorado Rockies shortstop Trevor Story (27) flips the ball to Ryan McMahon to force out Arizona Diamondbacks' Jake Lamb on a ball hit by Ketel Marte, who was safe during the sixth inning during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. A run scored. (AP PhotoRick Scuteri)

The Rockies' Daniel Murphy hit a ground rule double in the sixth because the ball got stuck under the padding of the right field foul pole.

And for good measure, a Wilmer Flores foul ball knocked over a phone in the press box.

ROSTER MOVE

Colorado Rockies' Raimel Tapia reacts after hitting a single in the seventh inning during a baseball game against the Arizona Diamondbacks, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies' Raimel Tapia reacts after hitting a single in the seventh inning during a baseball game against the Arizona Diamondbacks, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

The Diamondbacks called up infielder Ildemaro Vargas from Triple-A Reno before Tuesday's game after they optioned pitcher Bo Takahashi to Double-A Jackson following Monday's game.

Vargas has split time between Arizona and Reno this season. Takahashi, 22, was brought up for his first Major League stint on Sunday, but did not make an appearance in the brief time he was with the Diamondbacks.

UP NEXT

Arizona Diamondbacks' Carson Kelly and Archie Bradley (25) celebrate after the Diamondbacks defeated the Colorado Rockies 8-7 during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Arizona Diamondbacks' Carson Kelly and Archie Bradley (25) celebrate after the Diamondbacks defeated the Colorado Rockies 8-7 during a baseball game, Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Rockies: RHP Jon Gray (11-8, 3.84 earned run average) is scheduled to start the series finale against Arizona, and is coming off eight scoreless innings of five-hit ball in his last start, Aug. 16 against Miami.

Diamondbacks: RHP Mike Leake (0-1, 7,71 ERA with Diamondbacks; 9-9, 4.64 overall) is set for his seventh career start against the Rockies. He's 2-2 in his career against Colorado.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports

Colorado Rockies' Trevor Story watches his RBI single against the Arizona Diamondbacks during the seventh inning of a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies' Trevor Story watches his RBI single against the Arizona Diamondbacks during the seventh inning of a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies left fielder Raimel Tapia makes a running catch for the out on a ball hit by Arizona Diamondbacks' Christian Walker during the fifth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)

Colorado Rockies left fielder Raimel Tapia makes a running catch for the out on a ball hit by Arizona Diamondbacks' Christian Walker during the fifth inning during a baseball game Tuesday, Aug. 20, 2019, in Phoenix. (AP PhotoRick Scuteri)