NEW YORK — Given a quick lead, R.A. Dickey relinquished it in all of three pitches.

Jacoby Ellsbury overcame a first-inning deficit with a two-run homer, then added an RBI single against the knuckleballer to lead the New York Yankees over the Toronto Blue Jays 5-3 Monday.

“I had a lot of movement on it,” Dickey said of his knuckler. “Sometimes this game’s a matter of centimeters, you know, one that gets off the barrel, doesn’t get off the barrel and it’s popped out to right field.”

Jose Bautista was thrown out twice on the basepaths for the AL East-leading Blue Jays (77-60), who remained one game ahead of Boston.

Toronto had been 9-3 against the Yankees this year, winning seven of the prior eight matchups, and the Blue Jays needed only seven pitches to jump in front when Devon Travis doubled and Bautista singled, both on 0-2 counts.

But Brett Gardner took a strike in the bottom half and singled, and Ellsbury drove a high knuckler over the right-field short porch for his seventh home run.

Ellsbury added an RBI single in the third, and rookie Travis Austin hit his second double of the game in the fourth, a drive off the wall in left-center that drove in two runs for a 5-1 lead.

“I thought he was a little inconsistent with the knuckleball today,” Blue Jays manager John Gibbons said.

Dickey (9-14) gave up five runs and seven hits in four innings on a blustery afternoon, his second shortest start this season. He is 0-6 in his last nine starts at Yankee Stadium.

Masahiro Tanaka (12-4) won his fifth straight decision, allowing two runs and seven hits in 6 1/3 innings. He left after a leadoff walk and a fly ball by pinch hitter Dioner Navarro that 6-foot-7 Aaron Judge caught against the top of the right-field wall.

Jonathan Holder, who made his big league debut Friday, got an out but walked his next two batters. Edwin Encarnacion hit a two-run, opposite-field single to right off Ben Heller for his third hit, and Tommy Layne retired pitch hitter Russell Martin on a looping ball to second baseman Starlin Castro.

Four pitchers and three pinch hitters saw action in the half inning.

“That’s the beauty, too, of September, you can do those things,” Gibbons said before adding: “the beauty and then the drawback of September.”

WHOOPS

Toronto scored in the first inning for the fourth time in seven games on its trip and had runners at the corners and one out when Michael Saunders grounded to first and Bautista tried to score. Catcher Gary Sanchez dropped the throw from fellow rookie Tyler Austin as Bautista held up and restarted, but Sanchez had plenty of time to pick up the ball and tag Bautista. After third baseman Chase Headley’s backhand catch snared Josh Donaldson’s liner in the fifth, Bautista made the inning’s final out when he tried to go from first to third on a single to left by Edwin Encarnacion, the second of his three hits.

BALK

Dickey was unhappy that first base umpire Mark Wegner called a balk against him in the third inning, allowing Ellsbury to advance.

“I think they interpreted it that I moved my leg before I started to go to first base,” Dickey said. “It’s my 20th season professionally. I’ve been doing the same move my entire career, so it was a little bit of a surprise. I just thought we caught him. He was going, obviously.”

SKIDDING

Toronto’s Melvin Upton Jr. had a second-inning double that stopped 0-for-14 slide, and he singled in the fourth as part of a 2-for-4 day.

STREAKING

RHP Joaquin Benoit pitched a scoreless eighth and has thrown 16 1/3 shutout innings with 16 strikeouts since Toronto acquired him from Seattle on July 26.

DAY OFF

Gibbons rested shortstop Troy Tulowitzki.

TRAINER’S ROOM

Blue Jays: RHP Francisco Liriano left after two scoreless innings when his back tightened. “It’s nothing serious,” Liriano said.

UP NEXT

RHP Aaron Sanchez (13-2) is to start for the Blue Jays on Tuesday and RHP Luis Cessa (4-0) goes for the Yankees.