ATLANTA — The Tampa Bay Rays’ bid to clinch a postseason berth and complete their 15th series sweep of the season fell apart in the eighth inning Thursday, when reliever Kevin Kelly surrendered three runs on four consecutive hits in a 3-1 loss to the NL East-leading Braves.

The defeat pushes Tampa Bay’s earliest clinch opportunity to Friday night, when the Rays open their final regular-season homestand against the Astros at Tropicana Field, where they hold a 47-25 record this season. If the Rangers lose in Seattle on Thursday or the White Sox fall to the Pirates, the Rays would need just one victory to lock up an American League playoff spot.

“Should be some good energy at home,” starter Nick Martinez said. “We put ourselves in a good spot, and [we’re] looking forward to taking care of business when we get home.”

Martinez was brilliant in defeat, retiring 18 of the 20 batters he faced while throwing only 68 pitches into the seventh inning. He allowed just a pair of singles — to Matt Olson in the first and Ha-Seong Kim in the sixth — and erased Kim with a quick pickoff move to first. Manager Kevin Cash pulled Martinez after he retired Ronald Acuña Jr. to lead off the seventh, bringing in lefty Cam Booser to face left-handed hitters Olson and Michael Harris II, both of whom lined out to right field.

“I cannot say enough about how Nick Martinez threw the ball, how efficient he was,” Cash said. “Gave us every opportunity.”

Martinez took no issue with the early exit. “It’s late in the game, tight ballgame. We have a lot of confidence in our bullpen,” Martinez said. “Booz did a great job taking care of the two lefties coming in.”

The bullpen’s confidence proved costly in the eighth. Pinch-hitter Ozzie Albies tripled to right-center field and scored on an Austin Riley single through the drawn-in infield. Mike Yastrzemski followed with a ground-rule double to right, and Kim drove in two more with a single to center. Kelly acknowledged the damage but credited Atlanta’s approach. “They had a really good approach. I feel like I mostly executed when I wanted,” Kelly said. “There were a few big misses that I wasn’t happy with, but other than that, I think they just did a good job putting the bat on the ball.”

Braves left-hander Martín Pérez matched Martinez’s dominance, working 7 scoreless innings despite allowing baserunners. Tampa Bay loaded the bases in the first on singles by Yandy Díaz, Ryan Vilade and Jonny DeLuca, but left fielder Chandler Simpson grounded into an inning-ending 3-2-3 double play. “I put good wood on it, just right to him,” Simpson said. “Matt Olson just made a smart play, and the cards didn’t fall in our favor.”

The Rays’ lone run came in the ninth when Victor Mesa Jr. launched his 12th homer of the season — the first of his career as a pinch-hitter. Simpson said the team’s focus remains singular heading into the homestand. “One game at a time,” Simpson said. “Make sure we focus on every pitch, getting ready for the postseason and make sure we’re just locked in for everything.”

Tampa Bay must also fend off the Yankees, who sit 3 1/2 games back in the AL East with 16 games remaining. The Rays host the Astros beginning Friday before closing the regular-season home schedule against the Red Sox.