NEW YORK — Something in the rain must have stirred those Toronto hitters.

Or maybe it was just Michael Pineda's early exit.

Russell Martin homered twice, including a go-ahead shot in an eight-run eighth inning, and Troy Tulowitzki had a season-high four hits as the Blue Jays erased a six-run deficit following a 42-minute rain delay Tuesday night in their 12-6 victory over the New York Yankees.

"The rain helped us, I know that," manager John Gibbons said. "Got old Pineda out of there. ... We just came to life."

Edwin Encarnacion hit a tying homer and reached 100 RBIs with three in the eighth as Toronto took advantage of a major meltdown by New York's bullpen. Tulowitzki also went deep to help the Blue Jays complete their biggest comeback since June 2015. They climbed back atop the AL East, just ahead of Baltimore and Boston.

"It just felt like the momentum was shifting in our direction," Martin said. "But we definitely got a little bit lucky, got Pineda out of the game. It looked like he had his A-game today. So, you've just got to point to the sky and kind of thank whoever's up there helping out like that."

Impressive rookie Gary Sanchez homered twice for New York, including a titanic, three-run drive deep into the rarely reached second deck in left field at Yankee Stadium. It was the fourth time both starting catchers had multiple home runs in a major league game — first in the American League.

Didi Gregorius also homered for the Yankees, who squandered a chance to move within 4 1/2 games of first place. They lost for the second time in seven games and failed again to move five over .500 for the first time this season.

Scott Feldman (6-4) replaced ineffective Toronto starter Marco Estrada after the stoppage and struck out five in three innings of one-run relief. It was Feldman's first win with the Blue Jays since they acquired him from Houston at the Aug. 1 trade deadline.

Held scoreless over the first 14 innings of the series, Toronto's big bats finally busted loose after a downpour in the middle of the fifth ended Pineda's strong start.

"I would have loved to send him (back) out there, but what he went through with his shoulder, I just felt he couldn't do it," Yankees manager Joe Girardi said. "We just felt it's risky for him. And that's just not a risk we want to take. He's important to us."

Toronto pounced on reliever Anthony Swarzak in the sixth.

Devon Travis doubled and scored on a throwing error by third baseman Chase Headley. Two strikeouts later, Tulowitzki popped a two-run homer just beyond the short porch in right field, and Martin followed with a home run to centre.

It was the second time in three days that Tulowitzki and Martin went back-to-back.

"Now that the Yankees don't have (Andrew) Miller and (Dellin) Betances in the seventh and eighth inning, it makes for a different ballgame," Martin said.

With the Blue Jays trailing 6-4, reigning AL MVP Josh Donaldson worked a 12-pitch walk against Adam Warren (1-1) leading off the eighth.

Encarnacion, who leads the majors in RBIs, followed with a no-doubt drive deep into the lower deck in left field to tie it at 6. He dropped his bat on home plate and styled his way around the bases after his 34th homer tied Baltimore slugger Mark Trumbo for tops in the majors.

"He kept fouling off good pitches," Warren said about his tussle with Donaldson. "You want to get the first guy out, and when it goes that deep, hot night, and you're working hard, it wears you down a little bit. And obviously, a little demoralizing when you walk him."

Tulowitzki singled in front of Martin's 12th homer, a high fly to right that put Toronto ahead. It marked the 12th career multihomer game for the ex-Yankees catcher, the last three with the Blue Jays at Yankee Stadium.

"I wish you guys wouldn't have told me that. Now I'm going to be thinking about it," said Martin, who has homered in three straight games for the second time in his career. "I do like playing in New York; it's a good city. I like the atmosphere. There's always good energy. That might be a reason. But, I don't know, maybe I'm holding a little something against the Yankees."

Chasen Shreve entered and failed to retire any of his five batters. Travis hit an RBI single, and Donaldson drove in a run with his second walk of the inning. Michael Saunders had an RBI double, and Encarnacion's groundout gave him three RBIs in a half-inning that lasted 37 minutes.

The eight runs matched Toronto's largest inning of the season.

"The offence exploded," Estrada said.

FALLING APART

Warren had not allowed a run in nine appearances covering 11 innings since the Yankees reacquired him from the Chicago Cubs in the trade for Aroldis Chapman. It was the largest lead New York has blown since squandering a 7-0 cushion after seven innings at Tampa Bay on Sept. 28, 2011, according to the Elias Sports Bureau.

TRAINER'S ROOM

Blue Jays: OF Ezequiel Carrera (strained left Achilles tendon) was activated from the 15-day disabled list and started in right field. To open a roster spot, Toronto designated OF Junior Lake for assignment.

Yankees: LF Brett Gardner (ankle) sat out his fourth straight game. He was scheduled to run through drills in the afternoon and could start Wednesday, Girardi said.

UP NEXT

Toronto LHP J.A. Happ (16-3, 2.96 ERA) goes for his major league-leading 17th win Wednesday afternoon in the finale of the three-game series. Yankees LHP CC Sabathia (7-9, 4.20), the active major league leader in strikeouts (2,672) and complete games (38), is 15-8 with a 3.20 ERA in 24 career starts against Toronto.