NEW YORK — The thing about ballpark dimensions is that they’re the same for both teams playing there that night, so for all the hand-wringing the short right-field porch at Yankee Stadium brings onlookers, it can also bring a visiting team a gift.

Ramón Urías and the Orioles received that gift in the eighth inning Friday night, when his 337-foot fly ball to right field sneaked over the fence. It was the shortest home run of Urías’ career by a 26-foot margin, and yet it counts the same.

“We were all blowing as hard as we could,” interim manager Tony Mansolino said. “The whole dugout.”

That flare to the opposite field opened a two-run eighth inning that was enough to prod Baltimore to a series-opening 5-3 win against the American League East-leading New York Yankees.

The Baltimore Banner thanks its sponsors. Become one.

“This team’s gritty. When I played against this team on other teams, I hated facing them,” right-hander Scott Blewett said. “To get in late [from Tampa], you have a lack of sleep and then you show up and go put your best effort on the field and get a win at Yankee Stadium on a Friday night. That’s awesome.”

It’s the kind of win that is emblematic of a club that is stabilizing. Whether that stabilization comes too late remains to be seen. The trade deadline is approaching at the end of July, less than six weeks away.

And, while the Orioles’ win was of the overcoming sort and displayed mettle, Baltimore is 33-42 and still has six teams between it and the final wild-card spot. That sets up an interesting sprint to the end of next month, during which general manager Mike Elias must determine the path forward — buy, sell, stand pat?

Before the game, when Gunnar Henderson was asked what the Orioles must do to prove to Elias that selling isn’t the correct path, he said it would take more of the same.

“We’ve been showing it the past weeks or month,” Henderson said, and he isn’t wrong. Baltimore is 12-6 in June. With that pace, who knows what could happen?

The Baltimore Banner thanks its sponsors. Become one.

“We’ve kind of hit our stride a little bit,” Henderson said. “We still have room to go. But we’re making strides in the right direction.”

And then he backed up that belief in the eighth, when he entered as a pinch hitter with two outs and two runners on base. Mansolino left Henderson out of the starting lineup because he appeared to be dragging after four games in Tampa, “but if we’re in this game, and we get to that point, and some of those righties come in, he’s going to be ready to roll.”

In came right-hander Luke Weaver. He allowed the solo homer to Urías to concede the lead. Then he allowed two more baserunners before left-hander Tim Hill entered to replace him. Still, Mansolino chose to use Henderson in that left-on-left matchup, and Henderson lined an RBI single the opposite way.

“It’s one of the best players in baseball, regardless of who he’s going to face,” Mansolino said.

That rally overcame another brilliant performance from Aaron Judge against Baltimore.

The Baltimore Banner thanks its sponsors. Become one.

The home run from Judge against right-hander Tomoyuki Sugano seemed almost like an inevitability, considering Judge’s track record. The opposite-field long ball was Judge’s 48th against Baltimore in 111 games, which raised his career on-base-plus-slugging percentage to 1.210 — the highest OPS of any player with at least 400 plate appearances against the Orioles.

Judge reached four times, with two singles and an intentional walk in addition to his homer. But, even with a short start from Sugano, the bullpen kept the Orioles in it despite running on fumes.

“When you’re in a 16-game stretch, it’s going to be all-hands-on-deck, so we got to be prepared for any situation no matter what,” said Blewett, who pitched two scoreless innings. “The fact that we were able to go out and shut it down tonight, that was awesome.”

An outfield assist helped, too.

Ramón Laureano has a history of the ridiculous when it comes to outfield assists — look up some of his throws with the Oakland Athletics, for instance. He has another entry for his catalog after he ended the fourth inning Friday with a laser from right field.

The Baltimore Banner thanks its sponsors. Become one.

Rather than facing Judge a third time, the Orioles instructed Sugano to intentionally walk the slugger. Then left-hander Keegan Akin entered to pitch to Jazz Chisholm Jr., who promptly lashed a single to right field. The high bounce forced Laureano to leap. His momentum carried him to the glove side as DJ LeMahieu rounded third, aiming to score from second. Yet, in one fluid motion, Laureano unleashed an 86.3 mph strike that nabbed LeMahieu at the plate.

Tomoyuki Sugano allowed three runs on seven hits and three walks in 3 2/3 innings. (Evan Bernstein/Getty Images)

Mansolino said Laureano is “probably one of the more underrated players in the big leagues right now,” and that’s because his .842 OPS is only part of what he brings.

That throw prevented the line against Sugano from worsening, but it still was the shortest start of his brief major league career. The 35-year-old began it with consecutive walks — a lack of control that he infrequently exhibits — and a single and sacrifice fly leveled the game immediately after Baltimore had posted two runs off Max Fried in the first.

Jackson Holliday, who wasn’t initially in the starting lineup but replaced Adley Rutschman as designated hitter due to Rutschman’s left abdominal tightness, opened the contest with a single. Fried then hit two batters to load the bases, and Gary Sánchez — against the team with which he became a two-time All-Star — laced a two-run single to left.

The Orioles wouldn’t break through again against Fried until the sixth inning, when Coby Mayo’s second hit landed for an RBI single. For Mayo, it marked his second multihit game in his last four appearances.

The Baltimore Banner thanks its sponsors. Become one.

That might’ve been it for Fried, as Yankees manager Aaron Boone walked out of the dugout and signaled for a reliever to enter with two on and one out. Instead, Fried waved the reliever back to the bullpen, and he successfully talked his way into remaining in the game — and it worked. He forced Dylan Carlson and Luis Vázquez into outs to end the frame.

Once Fried exited, though, Baltimore broke through. That short porch can rankle certain teams, particularly when Judge flips opposite-field homers with apparent ease. But this time Urías took advantage of that distance, and Henderson added another in what became a standout victory.

“I think we just keep believing in ourselves,” Urías said, “keep believing in what we’ve got and, finally, it’s showing up.”

News and notes

  • The Orioles scratched Rutschman from the lineup less than an hour before first pitch due to left abdominal tightness. Mansolino said the issue “flared up” during batting practice.
  • Outfielder Tyler O’Neill is nearing a return to a rehab assignment early next week as he makes a second comeback attempt from his shoulder impingement. O’Neill had been on a rehab assignment this month, but it was cut short when lingering soreness required an injection in his AC joint. O’Neill has been limited to 24 games after signing a three-year, $49.5-million contract last winter.
  • Infielder Jorge Mateo is also nearing a rehab assignment after dealing with left elbow discomfort that stems from a collision with Heston Kjerstad in the outfield last month. Mateo, who underwent surgery on that elbow last year, last played June 6. He is back to participating in baseball activities.

This article has been updated.