Isaac Paredes homered and notched a pair of RBIs for Tampa Bay (86-56), which evened the four-game series at one win apiece.
Eugenio Suarez, Julio Rodriguez and Cal Raleigh each homered for Seattle (79-62).
Rays right-hander Chris Devenski (4-4) picked up the victory with two-thirds scoreless innings of relief. Devenski replaced starter Taj Bradley, who gave up four runs on six hits in 6 1/3 innings.
Rays closer Pete Fairbanks pitched a scoreless ninth for his 21st save.
Mariners right-hander Isaiah Campbell (4-1) took his first career loss after surrendering two runs in two-thirds of an inning. He followed starter George Kirby, who allowed four runs on five hits in 6 1/3 innings.
The Rays trailed 4-2 heading into the bottom of the seventh, when they stormed back with four runs to grab the lead. After Jose Siri doubled and stole third, Pinto blasted a two-run shot to left field that evened the score, and Ramirez followed three batters later with a two-run shot to left to plate Brandon Lowe and put the Rays on top.
Paredes led off the eighth with a homer, his 29th, to make it 7-4.
Tampa Bay opened the scoring with two runs in the first. Paredes hit a bases-loaded single to center field to drive in Yandy Diaz for the game's opening run, and Josh Lowe followed with a sacrifice fly to center.
Seattle evened the score at 2-2 in the second. Suarez hit a blast to center for his 19th homer, and Dylan Moore notched an RBI on a double to left.
Rodriguez gave the Mariners a 3-2 lead on a solo homer in the third. It was his team-leading 28th home run, matching his total from his rookie campaign a year ago.
Another solo shot, this time by Raleigh, increased Seattle's advantage to 4-2 in the fifth. Raleigh's two-out blast was his 27th of the season, which also matched his career high from 2022.
—Field Level Media