DENVER | Brandon Nimmo homered twice during a huge night at the plate, including an inside-the-park shot to begin the game, and the New York Mets finally gave Jacob deGrom some run support Monday in a 12-2 victory over the Colorado Rockies.

Wilmer Flores and Devin Mesoraco also went deep for New York, which won its third straight following a prolonged slide. Nimmo had four hits and set a career high with four RBIs — one night after his go-ahead, two-run homer with two outs in the ninth inning staved off defeat for the Mets and rallied them to a win at Arizona.

After pitching in terrible luck for weeks as New York’s hitters slumped, deGrom (5-2) got some help from his teammates at last. He allowed two runs — one earned — in eight innings to snap a two-game skid and win for the first time in six outings since May 18 against the Diamondbacks.

On the eve of his 30th birthday, the right-hander struck out seven, walked one and lowered his major league-leading ERA to 1.51. He improved to 4-0 with a 1.01 ERA in six career starts against Colorado.

The 12 runs the Mets scored were more than they managed in deGrom’s previous eight starts combined. He had given up only five earned runs in his last five games — without a single win to show for it.

It was the eighth home loss in a row for the Rockies, who have permitted at least seven runs in all those games. Colorado also lost manager Bud Black when he was ejected in the fourth for arguing a call by first base umpire Bill Welke.

Tyler Anderson (4-2) went 5 1/3 innings for the Rockies, yielding three runs and seven hits.

Playing in front of family and friends from his Wyoming hometown, Nimmo got the game off to a rousing start. He lofted a deep drive that hit off the right-center field wall and rolled away from Carlos Gonzalez. By the time the right fielder chased it down, Nimmo had charged past third base and went into home standing up, well ahead of a weak throw.

“I haven’t done that before. That was fun,” he said.

Nimmo became the third Mets player to lead off a game with an inside-the-park home run and first since Angel Pagan on Aug. 23, 2009, against Philadelphia. The previous New York player with an inside-the-park homer was Ruben Tejada on Sept. 2, 2015, also against the Phillies.

Nimmo’s second home run of the night came in the seventh off Harrison Musgrave and went over the center-field fence, allowing him to round the bases at a more conventional pace.

The Rockies got an RBI double in the second from Gerardo Parra and added an unearned run in the seventh when right fielder Jose Bautista bobbled Ian Desmond’s single, allowing Parra to score.

The Mets added six runs in the ninth on a pair of bases-loaded walks by reliever Jeff Hoffman, Amed Rosario’s two-run double and Nimmo’s two-run single.

TOUGH UMP

Plate umpire Tony Randazzo endured a painful night, twice getting struck by foul balls, but he saw it through. He was hit on his left hand by a foul tip off the bat of Nolan Arenado in the third inning but had team trainers wrap some protective tape around his hand and went back to work. In the sixth, a foul ball off the bat of Michael Conforto struck him at the base of his neck just above his protective breastplate. Clearly in pain, Randazzo was tended to again by trainers but managed to shake it off after a few minutes and stay in the game.

TRAINER’S ROOM

Mets: Slumping RF Jay Bruce was scratched from the starting lineup because of nagging hip soreness. He has missed four of the last five starts due to the injury, and manager Mickey Callaway said Bruce will be re-evaluated in the next day or two. Callaway said the disabled list remains an option. “We need to get Jay Bruce right so he can be the Jay Bruce that his team wants him to be and that he wants to be,” Callaway said. . RHP Noah Syndergaard, sidelined since May 26 with a strained ligament in his right index finger, played catch and came out of it well. He’s expected to do some longer tosses, 75 to 80 feet, as part of his ongoing rehab effort.

Rockies: RHP Carlos Estevez faced hitters for the first time since going on the DL with a strain in his pitching elbow near the end of spring training. Estevez threw about 20 pitches to Tony Wolters, Ryan McMahon and Noel Cuevas and reported to team trainers that he came out of the session pain-free.

UP NEXT

Mets: LHP Jason Vargas (2-5, 7.39 ERA) starts Tuesday night at Coors Field.

Rockies: RHP German Marquez (4-7, 5.13) is 0-2 with an 8.44 ERA in three starts this month.