It was Tampa Bay’s turn for some late-inning magic at Progressive Field. The Rays were long overdue for some.

After dropping the first two games in the series by one run, Tampa Bay salvaged the finale on Sunday as Taylor Walls drove in the go-ahead run in the eighth inning and the Rays held on for a 6-2 win over the Cleveland Guardians, who missed a chance to gain ground on Minnesota in the AL Central.

Including the postseason, Tampa Bay had played eight straight one-run games against the Guardians in Cleveland and gone 1-7 with six straight losses.

No wonder the Rays were feeling relived before their flight home.

Walls lined a single to right off Trevor Stephan (6-5) to bring home Jose Siri, who slid headfirst and safely around rookie catcher Bo Naylor’s attempted sweep tag. Siri had walked with two outs and stole second to set the table for Walls.

René Pinto hit a two-run homer for the Rays, who added three more runs in the ninth off Cleveland reliever Eli Morgan.

Although his team had some rough moments in the field — Tampa Bay had two errors, and Cleveland three — Rays manager Kevin Cash left feeling satisfied.

The Guardians got only five hits and stayed five games behind the first-place Twins with the season growing short. Minnesota, which lost 6-5 at Texas, opens a critical three-game series in Cleveland starting Monday.

Tampa Bay reliever Colin Poche (10-3) got the win, and Pete Fairbanks snuffed a ninth-inning threat for his 19th save.

Josh Naylor had an RBI in his return for Cleveland.

Playing for the first time since July 31, when he strained an oblique, the Guardians’ slugger delivered a game-tying RBI single in the fifth off Rays starter Taj Bradley to tie it 2-all.

The Guardians have missed Naylor’s presence in the middle of their lineup, but now have him back for the season’s most meaningful stretch.

Cleveland right fielder Ramón Laureano kept it tied in the sixth with a sliding catch on the warning track to take extra bases away from Siri.

With two Rays on base, Laureano sprinted into the right-field corner and nabbed Siri’s shot just before it touched down.

Bradley’s first appearance for the Rays since July 29 was also his first against Cleveland and the AL Central.

The rookie right-hander started strongly this season, going 3-0 in April before he began to struggle in June. The Rays sent him down to Triple-A Durham after he went 0-3 with a 7.89 ERA in July. He was recalled Sunday when Tampa Bay placed reliever Jason Adam (oblique) on the injured list.

Bradley, who walked five and struck out seven, said the stay in the minors was helpful.