Aaron Judge of the Yankees runs out a solo home run in...

Aaron Judge of the Yankees runs out a solo home run in the sixth inning of an MLB game against the Blue Jays at Rogers Centre on Thursday in Toronto. Credit: Getty Images/Cole Burston

TORONTO — Aaron Judge’s pinkie appears just fine.

The Yankees’ postseason chances do, too.

Backed by five homers, including two tremendous blasts by Judge, the Yankees inched closer to clinching a playoff spot Thursday night with a 6-2 victory over the Blue Jays in front of a stunned crowd of 29,659 at Rogers Centre.

The Yankees, who hit three homers in a game-changing sixth inning, quickly rebounded after seeing their winning streak end at seven games here Wednesday night. The victory completed a 5-1 trip that started with a three-game sweep of the Red Sox at Fenway Park, an accomplishment so impressive that Judge said: "I wish it was 6-0. Job's not finished. We have to keep going. We want to have home-field advantage."

With three games to play, the Yankees (91-68) have a two-game lead over the Red Sox (89-70) and Mariners (89-70) and a three-game lead over the Blue Jays (88-71) for the top wild-card spot.

The Yankees lowered their magic number to not only clinch a wild-card berth but to clinch home-field advantage in the wild-card game to two against the Mariners and Red Sox. Any combination of Yankees wins and losses by Boston or Seattle totaling two will leave that contender behind the Yankees in the final standings. The Yankees’ magic number to finish ahead of Toronto is one. All four teams still could finish in a four-way tie for the two wild-card spots at 91-71, and three teams still could finish in a tie for the second wild-card spot.

Beginning Friday, the Yankees will host the Rays (98-61), who have clinched the American League’s best record. The Mariners will host the Angels (75-84), the Red Sox will face the Nationals (65-94) in Washington and the Blue Jays will host the Orioles (52-107).

The Yankees, who notched their 44th comeback victory — second-most in the majors behind the Red Sox (46) and Rays (46) — trailed 2-1 entering the sixth.

And that point all heck broke loose against Blue Jays lefty Robbie Ray, considered a frontrunner for the AL Cy Young Award along with Gerrit Cole.

Ray entered the game 13-6 with a 2.68 ERA, a 1.04 WHIP and 244 strikeouts in 188 innings but had allowed 29 home runs. He gave up four more against the Yankees, including three in a span of four batters in the sixth.

After Ray retired DJ LeMahieu on a grounder to begin the inning, giving him 13 straight retired batters, Anthony Rizzo blasted a 3-and-1 fastball to right for his 250th career homer, tying it at 2-2.

Judge, who had hit his longest home run of the season in the first inning (455 feet to centerfield, 114.6 mph exit velocity), added his hardest-hit homer of the season (441 feet to centerfield, 115.3 mph exit velocity) three pitches after Rizzo's blast to give the Yankees a 3-2 lead. He has nine homers and 21 RBIs in the last 18 games and 39 homers and 97 RBIs overall.

Giancarlo Stanton walked and Gleyber Torres slammed a 0-and-2 fastball 425 feet to left-center for his ninth homer, making it 5-2 and ending Ray’s night. Brett Gardner homered off Julian Merryweather in the ninth to make it it 6-2.

The Yankees, who did not have a hit that didn’t clear the fence until there was one out in the ninth, finished with only six hits, went 1-for-9 with a runner on base and never put a runner in scoring position. Fortunately for them, when Judge, Rizzo, Torres and Gardner were in the batter’s box, they already were in scoring position.

Judge, who dislocated his left pinkie Sunday night in Boston and had it popped back into place on the field, also made a diving catch of Santiago Espinal's flare to rightfield to save a run. "That’s the kind of player he is," Yankees starter Corey Kluber said.

With the score tied at 1-1 and one out in the fifth, the Blue Jays' George Springer hit a liner that a leaping Gio Urshela nearly caught, but it rolled around in his glove and fell out for an infield hit. Marcus Semien appeared to hit into an inning-ending double play, but the out at first correctly was overturned. Vladimir Guerrero Jr. then hit a 420-foot shot off the very top of the centerfield wall that bounded back onto the field instead of ricocheting over the fence, and the RBI double gave the Blue Jays a brief 2-1 lead.

Michael King replaced Kluber at that point, and King, Luis Severino, Chad Green and Aroldis Chapman allowed no runs, three hits and a walk with seven strikeouts in 4 1/3 innings.

So the Yankees now go from Ray (Robbie) to Rays (Tampa Bay) as they try to reach the postseason and keep their hopes of a World Series alive. Said Rizzo, "We definitely have the arsenal."

"These guys," Aaron Boone said, "are playing with a ton of confidence."

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME