ORLANDO, Fla. — Cade Cunningham scored 32 points, and the top-seeded Detroit Pistons pulled off an incredible rally Friday night, erasing a 24-point deficit and beating the Orlando Magic, 93-79, to force a Game 7 in their Eastern Conference first-round series.

Detroit trailed by 22 at the half, and Orlando’s lead went to 62-38 early in the third quarter. The Magic looked absolutely poised to become the seventh No. 8 seed to eliminate a No. 1 seed in the conference quarterfinal round.

And then everything went wrong for Orlando. Everything.

The Magic became the first team since 1996-97 — when play-by-play began getting tracked digitally — to lose at home after leading by at least 24 points with a chance to win a series.

Tobias Harris scored 22 points for Detroit, which will host Game 7 on Sunday. Paolo Banchero and Desmond Bane scored 17 each for Orlando, which is now 0-2 in closeout opportunities in this series.

RAPTORS 112, CAVALIERS 110, OT

TORONTO — RJ Barrett hit a 3-pointer with 1.2 seconds remaining in overtime, and Toronto pushed their Eastern Conference first-round playoff series to a seventh game by beating Cleveland.

Evan Mobley had a chance to win it for Cleveland, but his 3-pointer bounced off the front of the rim.

Scottie Barnes had 25 points and 14 assists, Barrett and Ja’Kobe Walter scored 24 points each and Collin Murray-Boyles added 17 as Toronto held on after blowing an 11-point lead in the fourth quarter.

Game 7 is Sunday in Cleveland. The home team has won all six games so far in the series.

Mobley had 26 points and 14 rebounds, Donovan Mitchell scored 24 points and James Harden had 16 for the Cavaliers. Jarrett Allen scored 14 points and Dean Wade had 10.