BRADENTON, Fla. -- Jeff Karstens blanked the Blue Jays on two hits in becoming the first Pittsburgh pitcher stretched out to three innings, but Yan Gomes' pinch-hit homer snapped a tie in the seventh inning Wednesday and the Toronto Blue Jays went on to an 8-6 Grapefruit League victory over Pittsburgh, their third consecutive exhibition win over the Pirates.

"A pretty good workout for me. I feel better than I've felt in a long time," said Karstens, who had one strikeout without a walk. "But I'm still trying to get better. I got away with a couple of fastballs moving too much.

"And the changeup is coming along; I really haven't had it the last couple of years, and it's something that can really benefit me if I can get it to back away."

Pedro Alvarez and Garrett Jones hit their first home runs of the season as the Pirates built an early 4-0 lead.

Hitless in his previous five at-bats, Alvarez ripped a full-count pitch from Kyle Drabek in the second to the opposite field over the left-field wall. Jones followed in the third, connecting off Drew Hutchison.

But the Blue Jays rallied into a 4-4 tie in the fifth as the first five batters reached base against Brad Lincoln. Travis Snider's two-run homer, his first, made it 4-3 and was followed by consecutive doubles by Travis d'Arnaud and Adam Lind to tie the score.

Pittsburgh's Starling Marte hit a two-run home run in the seventh to make it 7-6, but Luis Valbuena added a solo shot in the eighth for the Blue Jays and an 8-6 advantage.

It was Toronto's sixth straight win over Pittsburgh in Grapefruit League play, since March 3, 2010.

Pirates Up next: After one right-hander (Drabek), it's back to a southpaw diet for the Bucs, as they travel to Clearwater to face the Phillies and Cole Hamels. Counting their season-opening series in PNC Park, this will be the first of nine games in 32 days between the intrastate rivals. Casey McGehee (0-for-5) could make his spring debut at third base, still looking for his first hit.