DENVER — Socrates Brito limped out of Denver on crutches and headed to the disabled list in June with a broken toe.

He walked away a winner on Sunday after delivering a clutch hit for Arizona.

Brito snapped a seventh-inning tie with a three-run homer, and the Diamondbacks held off a late rally for an 8-5 victory over the Colorado Rockies.

It was a welcome change for Brito after his last time at Coors Field. He broke his big toe when he fouled a ball off his right foot on June 23.

“It’s crazy,” Brito said. “I lost a month after I got hit in the foot.”

Brito came back in early August and was optioned to Triple-A Reno after hitting .125 in five games. He was recalled Friday after Arizona traded outfielder Michael Bourn and came through with his first home run since breaking his toe.

“He’s a big man with long levers and when he gets everything together he can do a lot of damage,” Diamondbacks manager Chip Hale said.

Archie Bradley scattered six hits over six innings and Jean Segura had three hits in his return to the lineup for Arizona.

Bradley (6-8) struck out six but it appeared he might be the hard-luck loser. Rockies starter Jon Gray (9-7) allowed a run in the first inning on a sacrifice fly but retired 17 of 19 batters before Arizona roughed him up in the seventh.

“He was in complete control the entire game,” Rockies manager Walt Weiss said. “Then he had baserunners there in the seventh inning.”

Trailing 2-1, the Diamondbacks tied it with three straight one-out singles. Brito made it 5-2 when he hit Gray’s first-pitch fastball into the second deck in right-center field.

It was his third of the season and the first home run off Gray in 22 1/3 innings.

“He’s got a good fastball and I wasn’t trying to do too much,” Brito said. “He’s a guy that throws a lot of fastballs, so I was always looking fastball.”

The seventh inning spoiled a good start for Gray, which included a four-pitch fourth. His pitch count was low and he was looking at possibly his first complete game when he ran into trouble.

“I felt like I could have gone 20 innings,” he said. “Just one bad pitch beat me.”

Pinch-hitter Tom Murphy had a solo homer off Patrick Corbin in the bottom of the seventh, but Brandon Drury’s two-run single in the eighth gave Arizona a four-run lead.

The Diamondbacks added a run in the ninth and then had to withstand Colorado’s comeback attempt. The Rockies scored twice on a single and a wild pitch, but Daniel Hudson struck out DJ LeMahieu and Carlos Gonzalez with two runners on to end it.

“Huddy’s best off-speed pitch is a changeup,” catcher Tuffy Gosewisch said about their approach against Gonzalez. “We threw him a first-pitch fastball and after that three straight changeups. The shadows helped the last couple of innings.”

TRAINER’S ROOM

Diamondbacks: OF Yasmany Tomas left due to illness following his single in the seventh. Hale said Tomas felt dizzy after running out the single but wanted to stay in the game. He was replaced by Kyle Jensen, who scored on Brito’s homer. … Segura was back in the lineup after missing one game because of a stomach bug. He was available to pinch hit on Saturday.

Rockies: OF Charlie Blackmon was out of the lineup for the second straight game with back tightness. Weiss said Blackmon has improved and was getting treatment. He could return Monday.

STREAKS

Paul Goldschmidt failed to reach base for the first time in 51 games against the Rockies. He was 0 for 4 with a sacrifice fly. He struck out looking in the ninth with a chance to prolong the streak. … LeMahieu extended his streak of reaching base safely to 21 games with a single in the first.

UP NEXT

Diamondbacks: RHP Zack Greinke (12-4, 4.17 ERA) faces his former team when Arizona visits the Los Angeles Dodgers on Monday.

Rockies: RHP Chad Bettis (11-7, 5.17) opens a three-game series against San Francisco on Monday.