NEW YORK -- CC Sabathia got clocked early and the New York Yankees, despite hitting four home runs during a furious rally, kept wobbling toward a playoff spot Saturday with an 8-7 loss to the Toronto Blue Jays.

Didi Gregorius hit a solo homer with the Yankees down 5-0 in the sixth inning. It was 8-1 in the seventh before Gregorius and Giancarlo Stanton homered and Miguel Andujar launched a grand slam.

New York began the day with a 1 1/2-game lead over Oakland for the top AL wild-card slot. The Yankees are just 6-7 this month.

Randal Grichuk hit two homers and doubled, and Kevin Pillar also connected as Toronto ended a four-game losing streak. The Blue Jays exhausted their bullpen, using seven pitchers to hold on.

Sean Reid-Foley (2-3) struck out 10, giving up singles in five shutout innings. He got even for getting hit hard at Yankee Stadium last month, when Stanton homered off him.

In the fifth, the 23-year-old rookie threw a high-and-tight, tailing fastball that tied up Stanton. The slugger started to swing and went around as he spun out of the way, winding up face-first in the batter's box, facing the backstop.

A frustrated Stanton slammed his right fist into the dirt - another punchout for Reid-Foley.

Ken Giles earned his 21st save, nine since being traded from Houston to Toronto. He struck out Gary Sanchez with a runner on second to finish the eighth and pitched a 1-2-3 ninth. On May 1 with the Astros, Giles allowed a tiebreaking, three-run homer to Sanchez and punched himself after he was removed from the game.

Stanton hit his 34th homer in the seventh. A batter later, Gregorius hit his 26th to break his own Yankees season record for home runs by a shortstop. Andujar's second slam of his rookie season came against Tyler Clippard and made it a one-run game.

Grichuk hit a leadoff homer in the second. He hit his 23rd home run in the third and Kevin Pillar followed with a homer that finished Sabathia (7-7).

Sabathia walked off to boos down 5-0 after 2 1/3 innings, matching his shortest outing since 2015. The 38-year-old lefty has won only one of his last 11 starts.

Toronto manager John Gibbons was ejected for the second time in a month at Yankee Stadium. After catcher Luke Maile - who wasn't in the game - began hollering from the dugout at plate umpire Roberto Ortiz and got tossed, Gibbons came out to take up the argument and also got ejected.

TRAINER'S ROOM

Yankees: Injured closer Aroldis Chapman (left knee tendinitis) looked good in a pregame bullpen session, manager Aaron Boone said. The lefty, who hasn't been in a game since Aug. 21, will next pitch in a simulated game, possibly on Monday. Star outfielder Aaron Judge (broken right wrist) might face Chapman in that workout. Judge returned to action Friday night against Toronto, playing two innings in right. He is being limited to defence and baserunning for now.

UP NEXT

Blue Jays: LHP Thomas Pannone (2-1, 4.13 ERA) makes his fourth big league start. The 24-year-old rookie pitched into the seventh inning last weekend to beat Cleveland.

Yankees: RHP Lance Lynn (9-10, 5.01) pitches on seven days' rest. The Yankees are 5-2 in his starts since they got him from Minnesota.