Pete Alonso swung his bat, grabbed it by the barrel and started to walk up the first base line. He knew that a 30th home run was in the bag. He just didn’t know where the ball was going to land, other than it being fair, of course.

Alonso broke a tie in the fifth inning and could have busted some seats. Or the hands of whichever spectator reached for a souvenir.

The assault on a Freddy Peralta fastball also enabled the Orioles to snap a four-game losing streak.

Trevor Rogers held the Rays scoreless in six of his seven innings and retired 13 of his last 14 batters in a 5-3 victory before an announced crowd of 25,963 at Camden Yards.

Andrew Kittredge tossed a scoreless eighth inning, Rico Garcia earned his sixth save, and the Orioles improved to 62-67. They won three of four games at Tropicana Field to finish their last road trip, were swept by the Yankees and rallied tonight after falling behind 3-1 in the second inning.

Dylan Beavers hit his sixth home run and his third in three nights to slice the Rays’ lead to 3-2 in the second. Coby Mayo was the last Oriole to homer in three straight games on April 21-24.

The Orioles tied the game in the fifth and the Rays lost their manager.

Jackson Holliday didn’t appear to check his swing on a 2-2 pitch, third base umpire Dillon Wilson ruled it a ball on appeal, and Kevin Cash yelled from the railing and got tossed. The Orioles had runners on the corners with one out at the time. It felt like a pivotal moment in the game.

Holliday began to walk back to the dugout, was surprised that he could return to the box and lifted a sacrifice fly to center field.

Alonso was next up and he demolished a 95.8 mph heater, sending it 443 feet to left-center field at 111 mph. It didn’t improve Cash’s mood.

Make that six straight 30-homer seasons for Alonso. He’s eclipsed the mark in seven of eight, with pandemic-shortened 2020 the exception.

Rogers cruised through the first inning on 10 pitches but allowed three runs in the second. Junior Caminero doubled and scored on Chandler Simpson’s single. Former Oriole Jorge Mateo grounded into a force, stole second base and came home on Kenny Piper’s first major league home run.

The Rays strung together three consecutive singles in the third but didn’t score. Samuel Basallo threw out Ryan Vilade trying to steal.

Liam Hicks’ two-out walk in the seventh gave Tampa Bay its first baserunner since Caminero singled with two outs in the third. Rogers allowed three runs and six hits with six strikeouts in seven innings, and he lasted through 103 pitches.

Rogers has posted a 2.57 ERA since June 1.

Righting some wrongs

The Orioles were quick tonight to reverse a couple of embarrassing shortcomings from earlier this week.

Holliday lined a double into left-center field in the first inning and scored on Alonso’s single up the middle, both hitters jumping on first-pitch fastballs from Peralta. Quite a turnaround for a team that was 0-for-16 with runners in scoring position in the previous series and hadn’t driven in a baserunner since Monday.

Leadoff hitters reached base only three times in 27 innings against the Yankees, who swept the Orioles. Holliday barreled a four-seamer using a customized Players’ Weekend bat with a drawing of his Bernedoodle “Coconut.”

An aggressive approach at the plate also worked for Beavers, whose home run came on a first-pitch fastball.

Batters had a .403 average on Peralta’s first pitches before tonight, which obviously made it into the scouting report.

Alonso’s single extended his career-long hitting streak to 13 games.

Welcome back Wells

Tyler Wells walked out of the Rays dugout and onto the field early this afternoon to visit with Orioles reliever Ryan Helsley. They spoke for a while near home plate and headed to the home bullpen.

“I didn’t really get the opportunity to say goodbye to a lot of these guys,” Wells said.

The Orioles traded Wells to the Rays at the deadline for minor league starter Michael Forret. He faced his former team twice in a four-game series at Tropicana Field, tossing a scoreless inning and surrendering home runs to Alonso and Christian Encarnacion-Strand.

The team played a welcome back video of Wells before first pitch. He stood on the top step of the Rays dugout and waved as fans applauded.

“It’s crazy,” he said. “Being on the other side of it, it’s a little weird. Kind of starting at the warehouse instead of staring at The Hilton is a little different, but it’s great. Obviously, getting to see all the guys and kind of just seeing what it’s like. The best way to put it is it’s different and it’s kind of a little bit of a shock.”

Wells found out about the trade while hanging out with Trevor Rogers, who seemed more likely to be moved to another team. Rogers kept checking his phone. Wells was more relaxed.

“I wouldn’t say it was in my mind,” Wells said. “It felt like it was one of those things that is a possibility but it wasn’t expected. We continued to have conversations about it and the night before the whole trade deadline, we didn’t really hear anything and we didn’t think anything was going to happen. And then about an hour before the deadline my phone started ringing and it happened all within about five minutes. So yeah, it happened quick and it was bit unexpected, but it didn’t catch us by surprise or anything like that. Caught us by surprise in the whole thing of packing. We weren’t packed up and ready to go or anything, but other than that, we were just kind of playing it by ear.

“Me and my wife have so many memories in this city. My wife’s side of the family is actually from Baltimore, so we have a lot of roots here, family-wise, professional and just personal.”