ST. PETERSBURG — The AL-leading Tampa Bay Rays built a six-run cushion, watched it nearly evaporate and hung on for a 7-6 victory over the Toronto Blue Jays at Tropicana Field, notching their 18th one-run win and 76th victory of the season.

Manager Kevin Cash called the recent stretch “quite the grind” after the Rays dropped four of their first five games on the homestand before grinding out the win. A five-run fourth inning proved to be the difference, sparked by a misplay from Toronto left fielder Jesús Sánchez, who let a Richie Palacios fly ball drop in front of him and allowed two runs to score.

The Rays then manufactured runs the old-fashioned way. With Cedric Mullins on third and Palacios at second, Taylor Walls laid down a sacrifice bunt that Kazuma Okamoto fielded and flipped home — too late, as Mullins slid in safely. Chandler Simpson immediately dropped another bunt, beating the throw to first and driving in Palacios. “Guys with speed on base there, just trying to get the ball down, play a little small ball and get the runners in,” Simpson said. Cash called the back-to-back bunts “pretty perfect.”

Junior Caminero capped the five-run frame with a groundout that scored Walls. DH Yandy Díaz, who had set the tone with a two-run homer in the first inning, said through interpreter Kevin Vera that the fourth inning captured the team’s identity. “It’s the singles. It’s the small ball. It’s the big base hits. It’s just who we are since the start of Opening Day,” Díaz said.

Starter Rasmussen retired nine of the first 10 batters he faced before surrendering a homer to Alejandro Kirk in the fourth and allowing four runs on five hits, a walk and a sacrifice fly during a seven-batter span in the fifth. Despite the shaky stretch, Rasmussen became the first Rays pitcher to win six consecutive starts since Blake Snell won a club-record nine straight in 2018. “What a win. I tried my hardest to make sure it didn’t happen,” Rasmussen deadpanned. “What our team has done, the resilience we’ve shown … it’s a special group.”

The rotation has been under strain all homestand. Nick Martinez allowed six runs in his shortest start of the season. Freddy Peralta lasted 4 2/3 innings, and Shane McClanahan was charged with three runs in 3 1/3 innings in his return from the injured list. Ian Seymour posted the homestand’s best outing, allowing three runs over six innings.

The bullpen locked things down with no margin for error. Cam Booser allowed a leadoff single in the sixth, and Kevin Kelly — who picked up four outs bridging the sixth through the seventh — let that runner score on a two-out double. Trade deadline acquisition Tyler Wells handled the eighth, and All-Star closer Bryan Baker retired Kirk with the tying run on base in the ninth to record his MLB-leading 36th save. “Obviously you want to win every game,” Baker said, “but especially ones like that where it’s kind of hectic, a lot of stuff going on.”

Ian Seymour is scheduled to start the series finale against Toronto on Thursday afternoon at Tropicana Field.