TORONTO -- The scene was set for Derek Jeter to once again deliver the big hit in his final game at Rogers Centre on Sunday.
Pinch runner Ichiro Suzuki was at third base after a double by pinch hitter Jacoby Ellsbury, who did not start because an ankle injury, when Jeter came to bat.
Jeter, the New York Yankees shortstop who was the designated hitter Sunday, took a called strike from closer Casey Janssen before hitting a soft line drive to second baseman Steve Tolleson to end the game.
It left the Toronto Blue Jays with a comeback 4-3 victory over the Yankees as they took the final two games of the three-game series.
"Those are the fun situations," Janssen said. "You want to be in those situations. I don't think I have had much success against him. You are trying to get a hit like always, I always like those positions. But he was better than me this time."
Right fielder Jose Bautista homered for the fifth straight game and left fielder Melky Cabrera and first baseman Edwin Encarnacion also hit solo home runs as the Blue Jays tied the game. Then second baseman Munenori Kawasaki grounded to single to right with two outs in the seventh to score pinch runner Tolleson with what proved to be the winning run.
The Yankees built a 3-0 after five innings led by center fielder Brett Gardner, who homered, tripled and doubled to fall a single short of hitting for the cycle.
Cabrera hit his 16th homer of the season with two outs in the sixth and Bautista followed with his 29th.
That cut the Yankees' lead to 3-2. The Blue Jays tied it when Encarnacion led off the seventh with his 28th homer of the season.
The next hitter, catcher Dioner Navarro walked and Tolleson ran for him. Reliever Dellin Betances replaced right-hander Brandon McCarthy (8-14) who allowed five hits and four runs in six-plus innings.
Betances struck out his first two batters. Tolleson stole second and came around to score on Kawasaki's single.
Blue Jays left-hander J.A. Happ (9-8) allowed nine hits and three runs in seven innings to get the win.
Left-hander Brett Cecil took over for the eighth and Janssen pitched the ninth, allowing a pinch-hit double on a bloop to shallow right by Ellsbury who did not start for the second day in a row because of an ankle injury.
"My adrenalin was pumping." Ellsbury said. "I typically don't pinch hit. ... In that situation, you want to get on base and get into scoring position. Once I saw that ball go up in the air I knew it was going to take a high hop. There's only one thing I could do, go for two and hopefully get into scoring position."
Ichiro took third on a groundout to first to set up the Jeter-Janssen confrontation.
"I guess that's what it's all about," Janssen said. "He's an unbelievable competitor, he's as clutch as they come. Being a competitor myself I embraced the opportunity to battle it out. He's had a heck of a career and I'm glad the Toronto people appreciated him like they did because he's one of a kind."
Jeter said, "It's tough, we only have so many series left, so many games left. We would have liked to play better here."
Jeter received a three-day luxury visit to Banff as a going away gift in a pre-game ceremony.
Blue Jays manager John Gibbons thought about the potential of drama when Jeter came to bat.
"When Ellsbury dunked that ball in, you figure, you know what, Jeter's going to come up and so many times he's done something clutch." Gibbons said. "And this will possibly be his last at bat here. He's been known to do so many of those things and it didn't feel good. And when it came off the bat I thought for a minute it would be over his head at second."
Gardner led off the first with his 16th homer of the season. It was the sixth homer of his career leading off a game, five of them this season.
The Yankees took a 2-0 in lead in the fourth on three singles. Second baseman Martin Prado led off with a single to left. Third baseman Chase Headley singled to right with two out. Prado took third and scored on a single to left by catcher Francisco Cervelli.
The lead was extended to 3-0 in the fifth when Gardner hit a one-out triple to left-center and was awarded home when the relay throw from shortstop Jose Reyes went well past third base. It was the 17th error of the season for Reyes.
NOTES: CF Jacoby Ellsbury (left ankle) was not in the lineup for the Yankees for the second game in a row after being injured sliding into home in the ninth inning on Friday. ... Blue Jays RHP Brandon Morrow (torn tendon sheath in right index finger) allowed one hit in one inning for Triple-A Buffalo on Saturday as he continued his minor league rehabilitation assignment. ... CF Colby Rasmus started in center field for the Blue Jays on Sunday after OF Kevin Pillar started the previous four games in center. ... Both teams have Monday off. The Blue Jays open a three-game series at Tampa Bay on Tuesday and will start RHP R.A. Dickey (10-12, 4.00 ERA) against RHP Jeremy Hellickson (1-2, 2.98). ... The Yankees are home to Boston for the opener of a three-game series on Tuesday and will start RHP Shane Greene (4-1, 3.09 ERA) against RHP Joe Kelly (2-3, 4.14 ERA).