NEW YORK — It was as definitive as home runs come. And James McCann knew it, standing there admiring his work as the Citi Field crowd booed.

A no-doubter to the second deck. Against the team still paying part of his contract, in his first game back at the stadium he called home for two seasons, in front of a fan base that named him one of the worst free-agent signings in Mets’ history.

His time with the Mets didn’t go as planned. But his first game back, now as a member of the Orioles, was a different story. He had three RBIs, and his fourth-inning home run scored two runs as the Orioles spilled out nine runs after three dry days in a 9-5 win over the Mets Tuesday night.

“I didn’t know what I was going to feel like coming back here,” he said. “I have good memories here. My family loved our time here. My tenure individually didn’t go the way I anticipated or expected; things happen for a reason and I’m at peace with it.”

The Baltimore Banner thanks its sponsors. Become one.

The Mets signed McCann to a four-year, $40.6 million contract in 2020. He hit just .220 with the team, with just 13 home runs across the two seasons as he battled injuries, much to the dismay of the harsh New York fanbase.

The Mets traded him to the Orioles as part of a salary dump prior to the 2023 season, but still paid $11 million of his contract that year and $8 million this year. It was a smart move by the Orioles — they got a veteran backup catcher to support Adley Rutschman for only $5 million for two seasons.

McCann smirked when asked if he thought Mets fans would boo him in his return — he played for New York long enough to know not to answer that. He’s quieted them quickly in all of his games against the Mets — going 3-for-3 against them last year at Camden Yards and hitting a two-run homer and a sacrifice against them Tuesday.

“Things just didn’t go the way I expected,” McCann said of his Mets tenure. “Do I wish that things had gone differently? Absolutely. I wish that it would have been the opposite but it wasn’t and there’s nothing I can do about it now.”

He wasn’t the only one to find success against Mets’ starter Jose Quintana. Colton Cowser had a triple and a double. Austin Slater had two hits and Anthony Santander hit his 37th home run of the season, tied for third-most in MLB.

The Baltimore Banner thanks its sponsors. Become one.

“We needed them,” manager Brandon Hyde said. “Got a couple big homers early. That was enormous for us to get a couple runs in the top of the ninth. I thought our at-bats were good and it was a nice night offensively.”

The offense needed to get out of its rut. But so did starting Dean Kremer, especially with the news that Zach Eflin would be joining an ever-growing list of starters on the injured list, which now includes enough pitchers to form its own rotation.

Kremer’s last outing, thanks to a cutter that finally worked for him, showed a step forward. He built on that momentum on Tuesday, pitching six innings and allowing just one run. It should have saved the bullpen — important for a team dealing with so many pitching injuries (Eflin was scheduled to pitch Wednesday; Cole Irvin will return after a stint in Triple A and start instead, Hyde said after the game.)

“He’s getting so much confidence in that split,” Hyde said. “When Dean’s got confidence going, he’s got really good stuff and he knows how to pitch and he understands he’s got multiple pitches to get guys out. I feel like really the last two starts he’s really done that well.”

Instead of smooth end to the game, though, Burch Smith let in four runs — only three of which were earned after a Gunnar Henderson error — to cut the Orioles lead to 7-5, meaning Baltimore had to send Yennier Cano out to finish the inning.

The Baltimore Banner thanks its sponsors. Become one.

But the offense, thanks to a series of errors from the Mets, added two runs back in the ninth to make it 9-5, setting up a big enough lead for Craig Kimbrel to enter the game. The Orioles have demoted Kimbrel to this role, pitching him only in games with large leads or deficits. He was able to wrap up the game without any drama, getting Jeff McNeil to fly out and striking out Tyrone Taylor looking.

“We had one bad inning out of the ‘pen today but hopefully that can improve,” Hyde said. “It’s gonna take all of us. It’s gonna take a team effort every single night. I was happy with how our guys were really locked in tonight.”