BALTIMORE — A disputed check-swing call ignited a four-run fifth inning for the Baltimore Orioles and got Rays manager Kevin Cash ejected in Tampa Bay’s 5-3 loss at Camden Yards, extending a skid that has trimmed the club’s American League East lead over the Yankees to just three games.

With the Rays ahead by one run, runners on the corners and one out in the fifth, starter Freddy Peralta delivered a 2-2 changeup that Jackson Holliday appeared to swing at — and Holliday himself seemed to agree, turning toward the Orioles’ dugout. But home-plate umpire Vic Carapazza pointed to third-base umpire Dillon Wilson, who ruled Holliday checked his swing. “I think it was very obvious that he crossed the [plane],” Peralta said. “Even he knew, because he was on the way to the dugout.”

Cash was immediately ejected by Wilson — his first ejection this season — and came onto the field to argue further. Asked afterward what he saw, Cash responded: “Do I really need to answer that?”

Shortstop Taylor Walls said the reaction in the Tampa Bay dugout was unanimous. “Everybody besides [Wilson], it looked like, seemed to think that he went. Our dugout erupted,” Walls said. “He was walking back to the dugout with, it looked like, 100 percent knowing he was going to be called out, but [the umpire] thought different.”

Rather than recording the second out, Holliday returned to the batter’s box and lifted a sacrifice fly to center fielder Jonny DeLuca to tie the game. Pete Alonso followed with a two-run homer on a 2-2 fastball to left-center field, giving Baltimore a lead it would not relinquish. “One of the best hitters in the game,” Peralta said. “We were competing on that pitch, but he was able to [do] damage on that one.” Peralta said the call “100 percent” changed the way the inning unfolded.

Despite the loss, Peralta struck out six, walked just one batter and completed a season-high-tying seven innings in his fourth start with the Rays. The offensive highlight belonged to rookie catcher Kenny Piper, who crushed his first Major League homer to give Tampa Bay a 3-1 lead in the second inning, caught Colton Cowser stealing and worked an 11-pitch at-bat. “Typically, I’m the kind of player that’s a cool cucumber, and I don’t show a lot of emotion,” Piper said. “But I think I shouted a little bit when I saw it go out, so that was a lot of fun.”

The Rays have now lost six of their last eight games after a perfect nine-game road trip out west, and the lineup managed just one hit and a walk after the third inning against starter Trevor Rogers and relievers Andrew Kittredge and Rico Garcia. “It’s almost September, so the race is getting tighter. So we’re gonna have to pick it up,” Walls said. Tampa Bay continues its series at Camden Yards with the Orioles over the weekend.