NEW YORK — There was a time at the start of the season when it seemed hard to imagine Ramon Urías having a path to playing time.

The Orioles had a stacked infield — Gunnar Henderson, Jordan Westburg and Jorge Mateo, plus Jackson Holliday, Connor Norby and Coby Mayo on their way up. Now, only three of the six remain. They need Urías more than ever. And luckily for them, he’s performing up to the task.

On Monday, after a lackluster six innings from the Orioles offense, Urías hit a home run to tie the game at 3. It could have been the spark they needed, but the rest of the offense failed to produce and Francisco Alvarez hit a walk off homer off Seranthony Domínguez as the Mets won 4-3.

“I made a couple mistakes, got behind in the count,” Domínguez said. “I tried to get back in the count but he just made a good swing, put the ball in play. ... It’s part of the game. No one wants to make mistakes, tomorrow is another day. Just get ready for tomorrow.”

The Baltimore Banner thanks its sponsors. Become one.

While Urías has been on a hot streak, the rest of the offense has struggled. On Saturday and Sunday, the Orioles had only seven combined hits as they wrapped up their series against the Red Sox. Monday wasn’t much better, the team going 0-for-5 with runners in scoring position.

But Urías — playing nearly every day with Westburg and Mateo on the injured list, Norby traded to Miami and Mayo optioned to Triple-A — once again stepped up. He hit a double in the fifth and advance to third on an error. Holliday scored him on a soft dribbler that managed to stay fair down the first base line.

The Orioles were down by two when the seventh started. Ryan Mountcastle hit a double, then went to third as Eloy Jiménez grounded out. Mountcastle managed to score on a David Peterson Balk to cut the Mets’ lead down to 3-2. Urías then hit his homer — a 432 feet shot to center field — to tie the game up.

“Feeling good,” Urías said. “I played, seen the ball well. I think the consistent playing time has been better for me, helped me a lot making an adjustment. Looking forward to keep doing it.”

Urías is 6-for-11 in his last four games, the same number of hits that Adley Rutschman, Gunnar Henderson and Anthony Santander — the middle of the Orioles’ lineup — have combined. With the game on the line, they grounded out, popped out and walked as the Orioles failed to put up any runs after Urías’s homer.

The Baltimore Banner thanks its sponsors. Become one.

“I think that was just a really good starter out there today,” manager Brandon Hyde said. “David Peterson’s been pitching outstanding this year and gave us a lot of trouble. He’s got really good command from the left side and multiple pitches he throws for strikes, and we didn’t hit very many balls hard against him.”

Trevor Rogers showed improvements from his previous three starts with the Orioles. He pitched 4 2/3 innings on Monday, allowing three runs. The first two came in the first inning, when he Mark Vientos hit a single and J.D. Martinez followed with a home run. The third came in then fourth, when Tyrone Taylor hit a RBI single.

Rogers was close to finishing the fifth, walking Francisco Lindor to open the inning but rebounding to strike out Vientos and Martinez for two outs. Rogers then walked Pete Alonso, though, and manager Brandon Hyde opted to take him out instead of facing Sterling Marte.

Rogers felt like his fastball command and changeup were the best that they’ve been since he was traded, and that his sliders were also working for him.

“I thought my stuff was really good today,” Rogers said. “It’s just the results aren’t there. I really like where I’m at. I know the numbers don’t say that but I really like where I’m headed.”

The Baltimore Banner thanks its sponsors. Become one.

Connor Selby took over with two outs in the fifth, pitching 1 1/3 scoreless innings in his Orioles’ debut, and Keegan Akin followed by retiring all six batters he faced in the seventh and eighth. Domínguez, who prior to Monday had a 1.74 ERA in his 10 appearances with the Orioles, entered the 3-3 game in hopes of getting it to extras.

He struck out Jesse Winker, but fell behind 3-0 to Alvarez. Domínguez’s plan, he said, was to get the ball into play to get the out. He threw a high fastball to Alvarez though, who connected on a towering 421 foot homer to end the game.

“Losses hurt,” Hyde said. “We’re having a sprint at this point and we’re trying to win as many games as we can.”