ST. PETERSBURG — Chandler Simpson’s two-out RBI single off a 99.7 mph fastball capped a four-run seventh inning Saturday as the American League-leading Tampa Bay Rays rallied from a three-run deficit to beat the San Diego Padres 7-6 before 25,621 at Tropicana Field.

The victory was the Rays’ 81st of the season and their 33rd in come-from-behind fashion, extending their AL East lead over the New York Yankees (76-59) to five games with 27 remaining. “Just kind of blacked out right there,” Simpson said afterward, grinning. “Hyped for the game and the team.”

Trailing 6-3 entering the bottom of the seventh, the Rays loaded the bases when Richie Palacios walked against right-hander Bradgley Rodriguez, and Cedric Mullins and Taylor Walls followed with singles. Yandy Díaz then ripped a 108.9 mph line drive off the center-field wall, scoring Palacios. A baserunning scramble ensued — Mullins had held up at second in case the ball was caught, leaving Walls stuck between second and third. Walls froze, forcing Padres second baseman Luis Rengifo to chase him, and when Mullins broke for the plate, Rengifo’s off-balance throw sailed toward the backstop. Both Mullins and Walls scored to tie the game at 6.

“I mean, it’s ‘Oh [no], we just blew it. Like we had three [on] as the tying run, and I just blew it,’” Walls said. “And then it turned into, ‘Oh, my God! I just tied the game up.’ … And it happened in about a second and a half.”

With pinch-runner Jorge Mateo at third and one out, San Diego intentionally walked Junior Caminero before pinch-hitter Ryan Vilade struck out, bringing Simpson to the plate against dominant lefty Adrian Morejon. Simpson slapped the go-ahead fastball to left field. “That’s a nightmare of an at-bat,” starter Nick Martinez said. “Some would say criminal.”

The Rays’ top of the lineup had carried the offense through six innings. Díaz doubled and scored on a Liam Hicks single in the first. Jonathan Aranda crushed a 453-foot solo home run on top of the batter’s eye in the third. Caminero ended a 15-game homerless drought and extended his career-best hitting streak to 12 games with a game-tying blast in the sixth — his 36th homer of the season. Martinez had surrendered a pair of one-run leads before relievers Garrett Cleavinger and Kevin Kelly gave up three runs in the seventh.

“That was a gutsy comeback, man. That was great,” Martinez said. “That’s a big win, man. Especially this time of the season, right? They stayed in the fight, man. They kept the energy up and made things happen for us.”

Manager Kevin Cash acknowledged the Padres’ bullpen depth made the deficit feel steeper than three runs. “They take a 6-3 lead, then you’ve got to think — just with how talented their bullpen is — our backs are kind of against the wall,” Cash said. “But the guys stayed at it.”

Simpson, whom Walls described as “way more animated on the field than he is in the locker room,” kept it simple: “Every win is big, but definitely a win like this … showed the resilience of the team.” The Rays close the series against San Diego at Tropicana Field on Sunday.