BRADENTON, Fla. -- Pirates second baseman Yamaico Navarro drove in three runs, including a solo homer in the seventh, but the Rays rallied for three runs in the eighth for an 8-6 victory over the Pirates on Thursday at McKechnie Field. Matt Mangini's two-run single in the eighth snapped the game's fifth tie and gave the Rays an 8-6 lead.

Mangini's sharp single off Jason Grilli (0-1) came after Tampa Bay had tied it on Will Rhymes' homer to lead off the inning -- the fifth time in the game the Rays had erased a Pirates one-run lead.

Navarro's RBI single with two outs in the seventh, his third RBI of the game, had given the Bucs a 6-5 lead in a back-and-forth affair. But the Rays finally broke the game open with their three-run eighth.

Earlier, the Pirates had taken leads of 2-0, 3-2, 4-3 and 5-4, only to have the Rays tie the score with single runs in every inning except the first and fourth.

Rod Barajas' first homer of the spring had given the Bucs a 3-2 lead in the fourth, but the Rays quickly answered in the fifth on Carlos Pena's run-scoring groundout to tie it at 3.

Nate McLouth's RBI double in the fifth put the Bucs up 4-3, and the Rays tied it on a scoring fielder's choice grounder by Rhymes in the sixth.

The Bucs then took a 5-4 lead on a leadoff homer in the sixth by Navarro, before the Rays scored an unearned tying run on Brad Coon's seventh-inning single.

Pittsburgh got to Rays starter James Shields for two runs in the first, both unearned due to second baseman Ben Zobrist's fielding error on McLouth's grounder. McLouth and Alex Presley, who had gone to third on the error, engineered a double steal for one run, then Navarro's RBI single made it 2-0.

Tampa Bay cut into the lead on Chris Gimenez's second-inning run-scoring single and tied it at 2 in the third as Jeff Karstens issued consecutive two-out walks to Zobrist and Pena in front of Jeff Keppinger's RBI single.

Shields went 5 2/3 innings and was charged with 10 hits and five runs, three earned. He had two walks, six strikeouts -- and also two pickoffs, nailing Nick Evans at third and McLouth at second.

Karstens fought control issues during his five-inning stint, issuing four walks along with four hits while being charged with three runs, two of them earned.

Up next for Pirates: The Pirates take on the hardest-hitting gang in Florida when they host the Tigers at 1:05 p.m. ET on Friday at McKechnie Field. Detroit leads the Grapefruit League in both batting and runs scored. Charlie Morton is due to start, and his challenges will include the Majors' top two RBI men this spring: Delmon Young (19) and Ryan Raburn (18). Ryota Igarashi, who needs to come up big to keep alive his hope of cracking the bullpen, is among the relievers expected to pitch.