DENVER — An inning before a brazen lapse of judgment that cost his team a game, Mets reliever Hansel Robles threw a pitch then landed awkwardly, pinching his genitals in the process. Despite a visit from the trainer, Robles survived the scare, which in the moment was enough to generate a few giggles from the teammates who congregated at the mound.

No one was laughing one inning later when Robles, feeling another unexpected sensation, fired a pitch to the backstop to force in the winning run of the Mets’ 5-4 walk-off loss to the Rockies.

As Robles started the ninth inning of a tie game, numbness seized the fingers of his right hand. He neglected to mention that he could no longer feel the baseball. The inning spiraled out of control. With one out, the bases loaded and a full count to Nolan Arenado, Robles’ 95 mph sailed so high that it struck a plexiglass door behind the plate on the fly.

“I’ve never thrown a pitch like that,” said Robles, whose wild inconsistencies this season have cast doubt upon his future with the organization.

As he walked off the mound, Robles looked at his fingers, offering his first hint of the culprit behind the latest loss of a season long swallowed up by absurdity.

“I’ve never seen that before,” catcher Travis d’Arnaud said. “I’ve never seen a walk-off like that. I didn’t even go after it. The game was over.”

advertisement | advertise on newsday

Asked later on why he hadn’t mentioned the numbness, Robles replied through a translator, “I was already there, so I just wanted to get out of the inning.”

Three times, the Mets fell behind the Rockies, only to come back and tie it. But they missed chance after chance to pull ahead, only to pay the price at the end.

Yoenis Cespedes hit a tape-measure solo shot, and the Mets got game-tying hits from Asdrubal Cabrera, Rene Rivera and Rafael Montero, the pitcher who entered play with a batting average of .091.

Montero also gave the Mets a chance, allowing four runs in 5 2/3 innings, though he also surrendered 10 hits.

For the second straight game, rookie Amed Rosario showcased his ability to sway a game with his legs. Leading off the fifth, Rosario hammered a drive into the gap in leftcenter, 420 feet away from home plate. In a flash, the rookie reached top speed, motoring around the bases so fast that he reached third base standing up.

Mets videos

According to Statcast, the journey took just 11.32 seconds from batter’s box to the bag, the fastest first to third time recorded for Mets player since the system was put in place in 2015. Rosario later scored to tie the score at 2 on Montero’s single to right, the first RBI of his big-league career.

“Until the ninth, that was a well played game,” Collins said.

Robles pitched a scoreless eighth, bouncing back from his awkward landing, as evidenced by the 96-mph fastballs he threw to finish off Trevor Story. With closer A.J. Ramos being saved in case the Mets took the lead, Collins’ only other option was Fernando Salas.

So when Robles encountered trouble in the ninth, he was tasked with working out of his own mess.

Robles plunked the leadoff man Jonathon Lucroy despite being ahead 1-and-2. After a sacrifice bunt, Charlie Blackmon was intentionally walked only for Robles to lose command once more and walk D.J. LeMahieu.

advertisement | advertise on newsday

Up came Arenado, who fell behind 0-and-2, giving Robles the advantage. But his next four pitches missed the zone. The last was supposed to be low and away. It was in and high — nowhere close to the plate.

“You can’t do that here,” Collins said. “He’s got too much talent. He’s got a great arm. He’s pitched big, big innings for us in the past. I know this is a tough place and everything else about it, but he had a chance to get us out of that inning and he just lost a feel for it.”

Only later did Robles reveal there was a reason, the latest black mark in a season in which he has already endured a demotion to Triple-A Las Vegas, a product of an ERA that has rose to 5.34.

Said Robles: “I didn’t think of saying anything because I usually will speak up when it feels like it’s maybe something a little bit bigger.”

Darvish vs. deGrom. After being acquired in a trade just minutes before the trade deadline on Monday, Yu Darvish makes his Dodgers debut on Friday night at Citi Field. He’ll be opposed by Mets ace Jacob deGrom, whose replica jersey will be given out to fans as part of the team’s free shirt Fridays.