Paul Goldschmidt snapped a tie in the ninth inning with his third long homer of the game, and the Arizona Diamondbacks pulled out a rain-delayed 10-8 victory over the Chicago Cubs on Thursday.

Goldschmidt hit a 3-and-2 pitch from Wade Davis (2-1) deep into the right-center bleachers with one out. J.D. Martinez followed with another solo blast off the Cubs closer.

Goldschmidt’s first career three-homer game gave him 25 for the season, and his six RBIs matched a career high.

Brandon Drury also homered for Arizona, which remained percentage points ahead of Colorado for the top NL wild card.

Willson Contreras smacked two home runs and had a career high six RBIs for Chicago, which lost consecutive games for the first time since the All-Star break. The Cubs’ NL Central lead over Milwaukee slipped to 1 1⁄2 games.

Brewers 2, Cardinals 1: Keon Broxton drove in the go-ahead run and saved a run with a leaping catch and Matt Garza made a strong start in his return from the disabled list for host Milwaukee.

Broxton, who robbed Jose Martinez of a homer in the second when he stretched his glove atop the centerfield wall, gave the Brewers a 2-1 lead with a single in the fifth off reliever Brett Cecil (1-4).

“It was awesome to be able to come out today and do something good for the team,” Broxton said. “I’m just trying to make plays. That’s my job. It’s huge for my confidence, it’s huge for the team’s confidence. It’s a win-win situation for everyone.”

Garza (5-5), making his first start since July 21 because of a right leg strain, gave up one earned run on four hits in 5 2⁄3 innings to give second-place Milwaukee its first home series win over St. Louis since July 2012. The Brewers, trying to stay close to first-place Chicago in the NL Central, won for just the fifth time in their last 17 games.

Garza retired 12 of his first 13 batters to improve to 2-0 against St. Louis this season.

advertisement | advertise on newsday

Tigers place Fulmer on DL

Detroit placed righthander Michael Fulmer on the 10-day disabled list with an elbow injury. Fulmer, the 2016 AL rookie of the year, had been dealing with elbow discomfort for years before it worsened during his last start.

An MRI revealed fluid around the elbow, but manager Brad Ausmus says there’s no ligament damage. The Tigers are describing the injury as right elbow ulnar neuritis.

Fulmer is 10-9 with a 3.58 ERA in 21 starts. Entering play Friday, he had accounted for more than one-fifth of Detroit’s wins this year.

To fill out the roster, the Tigers selected the contract of right-hander Edward Mujica from Triple-A Toledo.