TORONTO (AP) -- When his team is playing at home, Blue Jays manager John Gibbons understands long balls can hurt just as much as they help.

Yankees rookie Greg Bird launched a three-run shot in the 10th inning and New York beat Toronto 6-4 Tuesday night to move closer in the AL East race.

New York Yankees' Greg Bird, right, celebrates a three-run home run with teammate Slade Heathcott during the tenth inning
New York Yankees' Greg Bird, right, celebrates a three-run home run with teammate Slade Heathcott during the tenth inning (Nathan Denette/The Canadian Press via AP)
loading...

"We play in the homer dome," Gibbons said. "You're always on your toes. You never feel safe."

Andrew Miller (3-2) pitched two innings for the win and the Yankees closed within 2 1/2 games of first-place Toronto. The teams meet for the final time this season Wednesday night.

Bird connected off reliever Mark Lowe (1-3) for his 10th home run in 34 games and third in the past three nights.

The runs were the first Lowe had allowed in 10 September appearances.

"It was a good pitch, down and away, bottom of the zone," Lowe said. "He just leaned out and got it. Great piece of hitting."

There have been 186 home runs at Rogers Centre this season. Among AL parks, only Yankee Stadium (199) and Baltimore's Camden Yards (204) have yielded more.

Yankees manager Joe Girardi didn't want to contemplate his team's chances of catching the Blue Jays without Bird's timely homer.

"We would have dug ourselves a pretty deep hole," Girardi said.

Brian McCann led off the 10th with a bunt single and was replaced by pinch-runner Rico Noel. Slade Heathcott reached on catcher's interference before Bird drove a 2-2 pitch into the right-field bullpen. Six of his 10 homers have given the Yankees a lead.

"It seems like they've always been important, they've always been big homers," Miller said. "They're nothing to sneeze at. He's got them in big situations and he's been a huge part of this team."

Bird ripped his helmet off and slammed it to the floor in delight as he returned to the dugout following his homer.

"I was pretty pumped up," he said. "It's a big win for us, a big team win. Good feeling."

Carlos Beltran gave the Yankees a 3-2 advantage when he homered off Liam Hendriks in the eighth.

Toronto used a single and two walks to load the bases against Dellin Betances with two outs in the eighth, but Betances struck out Edwin Encarnacion to preserve the one-run lead.

Blue Jays outfielder Jose Bautista prevented a New York insurance run in the ninth by throwing out Chris Young at home plate on Jacoby Ellsbury's fly ball. It was Bautista's second outfield assist of the game - he also threw out Dustin Ackley at third base in the seventh.

Bautista's play proved vital when Dioner Navarro hit a tying homer on the first pitch he saw from Miller in the ninth. The blown save was Miller's second with the Yankees.

Kevin Pillar hit a two-out double, pinch-hitter Matt Hague was intentionally walked and pinch-hitter Russell Martin walked to load the bases before Miller struck out Josh Donaldson to send it to extra innings.

Encarnacion hit a solo homer in the bottom of the 10th but Toronto lost for the third time in four games.

The Yankees jumped out to a 2-0 lead in the first on McCann's RBI single and Beltran's sacrifice fly.

Pillar halved the deficit with a one-out homer into the second deck in left in the third, his 11th. Toronto tied it in the fourth on a two-out RBI single by Justin Smoak.

After his shaky first inning, Blue Jays starter Marco Estrada gave up a two-out double to Ellsbury in the second and a two-out single by Beltran in the third, then set down 11 straight before issuing a four-pitch walk to Ackley with one out in the seventh.

Ackley tried to go to third when Didi Gregorius followed with a single to right, but was thrown out by Bautista, with Donaldson leaping to catch Bautista's high throw, spinning as he landed and tagging Ackley's foot. Umpire Greg Gibson initially ruled Ackley safe, but the call was overturned upon replay review.

Estrada left after intentionally walking Ellsbury and was replaced by Aaron Loup, who gave up an infield single to Brett Gardner that loaded the bases. Hendriks came on and escaped the jam by striking out Alex Rodriguez on three pitches.

BULLPEN SHUFFLE

Gibbons said scuffling reliever Aaron Sanchez will share eighth-inning duties with Lowe and LHP Brett Cecil for the foreseeable future. Sanchez has struggled in four of his past five outings.

TRAINER'S ROOM

Blue Jays: SS Troy Tulowitzki played catch and fielded grounders for the first time since breaking his left shoulder blade in a Sept. 12 game at Yankee Stadium. There is no timetable for his return.

UP NEXT

Yankees: RHP Ivan Nova (6-8, 5.11 ERA) pitches in place of injured RHP Masahiro Tanaka (right hamstring) in the series finale Wednesday night. Nova will start for the first time since allowing six runs in 1 2-3 innings of a Sept. 12 loss to Toronto.

Blue Jays: RHP Marcus Stroman (2-0, 3.00) makes his third start since returning from a torn ligament in his left knee. It will be Stroman's second outing against New York. He pitched five innings to beat the Yankees on Sept. 12.

(© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)

More From New Jersey 101.5 FM