BALTIMORE (AP) — The Baltimore Orioles had just completed a spirited comeback, and all that remained was for unfailing closer Zach Britton to seal the victory.

It did not come easy.

Tampa Bay’s Mike Mahtook was cut down at the plate trying to score from first base with two outs, and Baltimore topped the Rays 5-4 Friday night to stay in the middle of the AL playoff picture.

“It was the most exciting game that I’ve played this year,” rookie Hyun Soo Kim said, “and I expect that there’s more coming. So I’ll enjoy every bit of it.”

The Orioles remained two games behind first-place Boston in the AL East and tied with Toronto for the two AL wild-card spots.

J.J. Hardy and Michael Bourn came through with RBIs in the eighth inning, and Pedro Alvarez and Chris Davis homered to help Baltimore rally from an early 4-0 deficit.

It was 4-3 before the Orioles took the lead in the eighth against wild reliever Brad Boxberger (4-2).

Two walks and a hit batter loaded the bases for Hardy, who tied it with an infield single. Bourn followed with a fly ball to left field, and pinch-runner Nolan Reimold easily scored as the throw was cut off.

Brad Brach (9-3) worked the eighth and Britton escaped with his 44th save in 44 tries.

With two outs in the ninth, Mahtook singled off the second base bag. Alexei Ramirez followed with a liner to left, and Mahtook wheeled toward home. The relay from Bourn to third baseman Manny Machado to catcher Matt Wieters easily beat him there.

“I knew it was going to be close, just based on the way Alexi hit the ball,” Mahtook said. “Left-field line, it wasn’t like he had super long way to run for it. I was on the move, he made a good play, and they were able to get me.”

Evan Longoria hit his career-high 34th homer and Richie Shaffer also connected for the last-place Rays.

Tampa Bay starter Chris Archer allowed three runs in 6 1/3 innings and struck out four to increase his AL-leading total to 221. The 18-game loser also avoided setting a franchise record for losses in a season.

Archer was replaced after giving up successive one-out singles in the seventh. Danny Farquhar hit Adam Jones with a pitch to load the bases for Hyun Soo Kim, who hit a deep liner to center. Kevin Kiermaier leaped with his back to the 7-foot wall, grasped the ball and brought it back onto the field before it popped from his glove.

“That’s a grand slam with any other center fielder,” Rays manager Kevin Cash said.

Kim was limited to an RBI single, and Farquhar struck out Machado and Davis.

But Baltimore would not be denied in the eighth.

Longoria homered off Ubaldo Jimenez with a man on in the first inning and Shaffer went deep in the second for a 4-0 lead.

Jimenez settled down after that. The right-hander gave up four runs over seven innings, striking out eight.

Alvarez hit his 21st home run in the second and Davis delivered No. 38 in the fourth. Davis also struck out twice and has 201 for the year.

Baltimore’s Mark Trumbo, the major league home run leader with 42, was sidelined with back spasms. It was only the second game he’s missed this season.

OUT IN LEFT FIELD

Brad Miller usually plays shortstop or first base for the Rays. In an effort to gauge Miller’s versatility and add flexibility to the roster, Rays manager Kevin Cash started him in left field.

It didn’t take long for Miller to get noticed: The second Baltimore batter of the game hit a pop to left that glanced off Miller’s glove for an error.

The glove was borrowed from Farquhar.

TRAINER’S ROOM

Rays: 1B Nick Franklin, who strained his hamstring on Thursday, was held from the game. Cash listed him day-to-day.

Orioles: RHP Darren O’Day (rotator cuff strain) threw 26 pitches in a simulated game and could be activated Sunday or Monday. … OF Joey Rickard (thumb) took a couple of practice swings, and “it did not go well,” manager Buck Showalter said. Rickard has been on the DL since July 21.

UP NEXT

Rays: Matt Adriese (7-7, 4.46 ERA) starts Saturday night, coming off his first career win against the Yankees on Sunday. The right-hander is 0-3 with a 9.24 ERA lifetime vs. Baltimore.

Orioles: Chris Tillman (16-5, 3.68) makes his second start since being activated from the DL with right shoulder bursitis. He beat Detroit on Sunday.

Copyright 2024 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox