Elías Díaz hit a three-run homer in the bottom of the ninth inning to give the Colorado Rockies a rain-delayed 5-2 win over the St. Louis Cardinals on Thursday night, spoiling Nolan Arenado’s return to Coors Field.

Arenado went hitless in four at-bats during his first game in Denver since Colorado traded him to St. Louis in the offseason. He popped out to first in his first two trips to the plate and grounded out in his last two.

When he walked to the plate in the first inning, Arenado got a mostly warm reception from the crowd. The star third baseman tipped his helmet to the fans and then tapped his chest and pointed to the stands.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"I’ve seen these before in my years in the game and that was a very good one. I thought that the crowd was very classy," Rockies manager Bud Black said. "I thought Nolan did a very nice job of working his way around the ballpark."

Hours later, Díaz turned on an 0-2 slider from reliever Giovanny Gallegos (5-2) to end it.

"I had a lot of confidence going into that at-bat," said Díaz, who has homered in each of his last three games. "My only plan going into it was to see a pitch and hit it hard."

Brendan Rodgers also homered and Daniel Bard (4-4) got the win in relief for the Rockies, who have won four straight.

Gallegos retired the first two batters to start the ninth and had Díaz in a hole before he hit one 424 feet into the seats in left. It was the first walk-off homer of his career and his fifth of the season.

"The two quick outs, the stuff looked good from Gio," St. Louis manager Mike Shildt said. "A slider that got too much of the plate and Díaz put a good swing on it."

Rodgers gave Colorado a 2-1 lead with a two-run shot in the second inning, his fifth of the season.

Paul Goldschmidt, who has hit well against the Rockies, hit his 26th career homer against them to tie it in the third. It was his 12th of the season.

Cardinals starter Adam Wainwright extended his mastery of Colorado. In 17 games — 13 starts — he has a 1.72 career ERA against the Rockies, and at Coors Field he has a 2.42 ERA in seven games, six starts.

Wainwright kept up his workhorse trend with 110 pitches, eclipsing the 100-pitch mark for the fourth straight game and ninth time this season. He retired 12 of the last 13 batters he faced to keep the game tied.

"I always consider myself the best pitcher in the game when I go out there," said Wainwright, who is 11-1 against Colorado. "As soon as I stop thinking that way, I’ll retire. That’s the edge I try to bring out there. It doesn’t surprise me when I do well; it seemingly surprises everyone else, but that’s fine."

Antonio Senzatela nearly matched Wainwright, going seven strong innings before turning it over to the Colorado bullpen.

The start of the game was delayed 58 minutes due to rain.

TRAINER’S ROOM

Cardinals: OF Harrison Bader was activated from the 10-day injured list and started in center field. St. Louis optioned outfielder Lars Nootbaar to Triple-A Memphis. Bader missed 34 games with a right rib hairline fracture sustained diving to attempt to catch a line drive May 24 at the Chicago White Sox.

Rockies: LHP Kyle Freeland (left hamstring) is still on track to make his scheduled start Saturday, Black said. Freeland left Monday’s outing when his hamstring tightened up running the bases.

QUICK WORK

Coors Field has a reputation for games that can take four hours to play, but it has hosted some fast ones, too. On July 1, 2008, Rockies starter Aaron Cook tossed the shortest nine-inning game in Coors Field history. He needed just 1 hour, 58 minutes, and 79 pitches to throw a five-hit shutout against San Diego.

UP NEXT

Cardinals RHP Johan Oviedo (0-4, 5.23 ERA) will face Colorado RHP Chi Chi González (2-5, 5.81) in the second of a four-game series on Friday night.