The Tampa Bay Rays' Travis d'Arnaud watches his three-run home...

The Tampa Bay Rays' Travis d'Arnaud watches his three-run home run during the ninth inning against the Yankees on Monday in the Bronx. Credit: AP / Kathy Willens

In his final weeks as a Met before his May release, Travis d’Arnaud was routinely booed at Citi Field. Fast-forward to Monday night, and it was d’Arnaud who repeatedly silenced a Bronx crowd of 43,173 by blasting three home runs, the last one a three-run shot off Aroldis Chapman with two outs in the ninth inning to give the Rays a stunning 5-4 victory over the Yankees.

Moments later, behind the closed clubhouse door, you could hear the Rays break into loud cheers. We’ll give you one guess about the identity of the recipient of all that unbridled affection.

No catcher in history had ever hit three home runs in a single game against the Yankees, and now d’Arnaud owns that distinction as the backup for the 56-40 Rays, the same guy who was written off in Flushing.

When asked where this event ranked in his career, d’Arnaud didn’t hesitate. “This is No. 1, the coolest night ever,” he said. “As far as the regular season goes.”

The asterisk is because d’Arnaud made it to the World Series with the Mets in 2015, so there were good times, for sure. But they all reside in his rearview mirror, and now the future looks bright again.

The Met who batted .087 (2-for-23) before getting dumped is on a career-best nine-game hitting streak, cruising at a .444/.512/.917 clip with five homers and 10 RBIs in that stretch.

“I know after 50 at-bats I started feeling more comfortable,” said d’Arnaud, who didn’t make it half that far with the Mets. “I don’t know why, but that was the number. And then as far as catching, right when I came over here, I felt comfortable. Everyone’s been great in helping me get back to the player I know I can be.”

D’Arnaud, making his seventh start in the leadoff spot, opened the game with a homer off James Paxton, then got him again in the third inning. Against Chapman, with two on and two outs, d’Arnaud battled back from 1-and-2 to work the count full before hammering the eighth pitch for a rainbow that dropped into the short porch as Aaron Judge looked helplessly skyward.

“He’s played in this environment,” Rays manager Kevin Cash said. “He’s been fortunate to play over there with the Mets in a lot of big games, a lot of fans, bright lights. That’s certainly got to play a factor and help him when he’s got some of these big opportunities and come through.”

Right around now is when you ask yourself, why can’t the Mets get these kinds of players? Kidding, of course. D’Arnaud was one of the longest-tenured Mets before they cut him loose. Now he’s been restored to the player he always should have been, but it’s for the smarter-than-everybody-else Rays.

Nine days earlier, d’Arnaud hit a walk-off homer against Chad Green, only the second game-ending hit of his career (the other was for the Mets in 2013).

A Mets fan had two ways to look at that: by being frustrated by his instant success elsewhere or by breaking into applause for tormenting their crosstown rival.

But that wasn’t just some lucky punch, as d’Arnaud proved Monday night. He has nine homers in his last 24 games after failing to clear the fences in his first 26, including 10 with the Mets and one during his stay with the Dodgers.

What derailed d’Arnaud with the Mets was the incessant string of injuries, culminating with last year’s Tommy John surgery, and the subsequent mishandling of his return by rookie general manager Brodie Van Wagenen and his reshuffled front office. Why the Mets tendered d’Arnaud a one-year contract worth $3.52 million — they’re still paying it — only to keep him through an uncertain spring training and then release him as early as May 3 remains a head-scratcher.

Coming back from Tommy John surgery is a lengthy, deliberate process, and the Mets seemed to get impatient with d’Arnaud rather than give him more time for rehab. Maybe the pressures put on this year’s club by Van Wagenen’s bold proclamations led to some of that, but whatever the case, d’Arnaud’s struggles at the start of this season were painfully real.

For those still carrying a torch for d’Arnaud, as well as possessing a Mets-bred hatred for the Yankees, he’s given you a reason to smile. You know he was grinning late Monday night.

“Not bad for a day I almost missed the bus,” he said.

All he needed, apparently, was that ticket out of Flushing.

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months