PHOENIX (AP) — David Peralta stood up at his postgame interview session and pointed to a spot on his left leg just above his knee.

“Feels good,” the Arizona outfielder said. “Walk-off win. Just hit my quad. Couldn’t get out of the way.”

Peralta took Daniel Bard’s pitch for the team Tuesday night, getting hit with the bases loaded, and the Diamondbacks defeated the Colorado Rockies 4-3 in the series opener at Chase Field.

Manager Torey Lovullo said he couldn’t remember if he’d seen a game end like that before.

“Great moment,” he said of the bench reaction. “They deserved to win this game. We built the inning with patient approaches. The guys before him set it up and then David did his job.”

Stephen Vogt led off the ninth against Colorado reliever Daniel Bard (4-5) with a sharp single up the middle. Stuart Fairchild, called up earlier Tuesday and making his debut in the majors, ran for Vogt. Daulton Varsho walked on a full count and Nick Ahmed lined to center with the runners holding.

Josh Rojas walked to load the bases and Peralta took a pitch off the leg, allowing Fairchild to score the winner for a memorable major-league entrance.

Joakim Soria (1-3) pitched a perfect ninth for the win, just the Diamondbacks' 10th since April 30.

The Rockies, who had won four of their last five at home, fell to 6-32 on the road this season. That .158 percentage is below the previous all-time worst road mark of .167, set by the Boston Braves in 1935.

The Diamondbacks put Rockies starter Jon Gray behind immediately. The first four batters — Rojas, Peralta, Eduardo Escobar and Christian Walker — each doubled for a 3-0 lead. But Gray only gave up two more hits, both singles, and went six innings before leaving for a pinch hitter.

Colorado eventually pulled even on single runs in the fourth, fifth and seventh innings. Brendan Rodgers’ double off Merrill Kelly scored Charlie Blackmon, who had singled with two out in the fourth.

Raimel Tapia’s two-out single in the fifth brought home C.J. Cron with the Rockies’ second run, and an infield out following a walk, single and sacrifice bunt pulled them even in the seventh. Yonathan Daza was originally ruled safe at first on the grounder to third base but the call was overturned on review.

KELLY'S HEROICS

Kelly has been on the mound the last four times the Diamondbacks have won going back 31 games. He didn’t get the win this time, but kept his team in the game.

“He’s been the guy that right now we’re turning to,” Lovullo said. “That’s what we need. Merrill’s been throwing the ball extremely well, executing pitches.”

Since June 2, the Diamondbacks are just 4-27, with Kelly standing in the way of a possible 31-game losing streak.

“It’s kind of bittersweet,” Kelly said of his individual success. “It’s cool to be part of it, but all I really want to do is see more wins.”

Kelly gave up six hits and two runs, walking one and striking out one, and left with a 3-2 lead in the sixth. The Rockies tied it in the seventh to keep him from getting the W.

“I was happy with the results based on how I felt,” Kelly said. “I didn’t feel great out there like the last couple games.”

FAMILIAR FOE

Gray started against the Diamondbacks for the fourth time this season. In those games including Tuesday, he’s 1-1 with a 3.86 ERA.

Gray, making his third start since being activated June 25, struck out eight and walked one. He missed three weeks with a right flexor strain.

TRAINER’S ROOM

Diamondbacks: Manager Torey Lovullo said LHP Madison Bumgarner (left shoulder inflammation) threw three innings (55 pitches) in a simulated game on Monday and reported no discomfort. OF Kole Calhoun (strained left hamstring, on 60-day IL) will play in an Arizona League game on Thursday.

OF Ketel Marte (strained left hamstring) participated in baseball activity including live at-bats. “We’re trying not to have him run, but are initiating different exercises” for his leg, Lovullo said. RHP Zac Gallen, who landed on the injured list after injuring his right hamstring in his last start Friday, is scheduled for a bullpen session tomorrow.

UP NEXT

Humberto Castellanos (0-1, 3.09) makes his first big-league start for Arizona against fellow RHP Antonio Senzatela (2-7, 4.58) on Wednesday night.