DENVER -- Arizona's defense nearly cost the Diamondbacks a win until Rickie Weeks Jr. came through with a game-saving play.
Weeks made a leaping catch of Nick Hundley's drive at the left-field wall in the bottom of the ninth inning, and the Diamondbacks held on for a wild 10-9 win over the Colorado Rockies on Friday night.
Yasmany Tomas homered twice and drove in four runs, Michael Bourn had a tiebreaking single in the ninth inning, and Jean Segura had three hits and scored the winning run for the Diamondbacks, who have won seven of their past eight.
"That's the way it is here. You have to keep banging and keep playing the game," manager Chip Hale said. "They didn't stop playing and our guys didn't either."
Arizona overcame four errors and went overtime to improve to 7-1 on its current road trip. The game took 4 hours, 30 minutes to play, setting a National League record for a nine-inning game, per Elias Sports Bureau research. The previous record was 4:27 between the Dodgers and Giants on Oct. 5, 2001.
The lead changed hands four times in the last four innings before Brad Ziegler escaped the bottom of the ninth for his 16th save.
"It showed the fight this team has," Ziegler said. "It would have been really easy after the way the bottom of the eighth went to just lay down and die, and they just went out and kept hitting."
The Diamondbacks led 8-3 before Colorado rallied with two in the seventh and four in the eighth. Carlos Gonzalez, who didn't start because of a sprained right wrist suffered Thursday, gave the Rockies a 9-8 lead with a pinch-hit RBI double off Randall Delgado.
Tomas' solo shot with one out in the ninth off Carlos Estevez (1-5) tied the game. Segura doubled one out later and Bourn singled him home with a sharp liner to left.
Estevez got tagged with the loss in Arizona's 7-6 win Thursday night.
The Rockies nearly rallied in their half of the ninth. Nolan Arenado led off with a double, moved to third on an error and tried to score from third on a grounder to short but was thrown out at home.
"We're going on contact there," Rockies manager Walt Weiss said.
The Rockies had two runners on when Hundley sent a ball to the wall in left. Weeks, who came into the game on a double switch in the eighth, made a leaping catch that would have won the game for the Rockies.
"Off the bat, I was tracking the ball and trying to make a play," Weeks said. "Obviously it was a do-or-die situation."
Tomas hit a three-run homer in Arizona's six-run seventh for his third career multi-homer game.
Josh Collmenter (1-0) pitched to one batter in the eighth.
Both starters were out of the game before the offenses got rolling. Arizona's Archie Bradley gave up one run on five hits in five innings. Colorado's Tyler Anderson allowed two runs on eight hits in 5 2/3 innings.
Arizona 3B Jake Lamb came through at the plate but struggled in the field. Lamb had three hits and three RBIs but committed three errors to keep Colorado rallies alive.
Paul Goldschmidt was 2-for-3 and walked three times to reach base for the 46th straight game against the Rockies. It's the second-longest streak against Colorado to Mike Piazza's 48. It is the longest current streak against the Rockies.
Diamondbacks: OF Socrates Brito was placed on the 15-day disabled list with a non-displaced fracture on his right big toe. Brito fouled a ball off his foot in Thursday's win over the Rockies. Arizona recalled outfielder Brandon Drury from Triple-A Reno to take Brito's place on the active roster. Drury was optioned to Reno on Sunday. ... INF Nick Ahmed was out of the lineup with what Hale described as "hip issues." Hale said Ahmed's hips have been sore for a while, and giving him a few days off might help.
Rockies: LHP Jake McGee (sprained left knee) threw a 20-pitch bullpen session, his first since going on the disabled list June 11. ... RHP Adam Ottavino (torn ulnar collateral ligament) is scheduled to pitch one inning Sunday for Triple-A Albuquerque after throwing one inning Thursday. Ottavino has been out since undergoing Tommy John surgery in May 2015.
Diamondbacks: RHP Shelby Miller (2-6, 6.36) will make his second start since being reinstated from the 15-day DL on Monday. He is 2-3 with a 5.08 ERA in eight career starts against Colorado.
Rockies: LHP Jorge De La Rosa (4-4, 7.17) has won three straight and has logged two straight quality starts in his return to the rotation.
What to know about 2022 Baseball Hall of Fame vote: Is Ortiz getting in? Will Bonds, Clemens fall short?
Cooperstown's newest inductees will be revealed Tuesday. Here's who is most likely to make it and the big stars who won't.
MLB lockout: Are the owners and players talking? Should baseball fans be worried? Here's the latest
Nearly two months since the lockout began, it's time for another update on where baseball's immediate and long-term future stand.
What's next for Rays after Montreal split-season plan is nixed?
Alden Gonzalez reports on the Rays having their proposal to split their home games between Tampa Bay and Montreal rejected by Major League Baseball.
Sources: MLB Players Association to make counteroffer to league in Monday meeting
The MLB Players Association is expected to make a counteroffer to the league on Monday, 11 days after clubs gave the union a proposal, sources told ESPN.
Robot umpires at home plate moving up to Triple-A for 2022, one step away from major league baseball
Major League Baseball is expanding its automated strike zone experiment to Triple-A, where it will deploy robot umpires at home plate for the 2022 season.
David Ortiz's Hall of Fame case
Outside the Lines looks at David Ortiz's Hall of Fame candidacy and what may be holding him back from induction.