TORONTO — The Pistons delivered for coach Dwane Casey in his return to Toronto.

But Detroit left it late, rallying from a 19-point deficit to edge the Raptors 106-104 Wednesday night on Reggie Bullock's buzzer-beater before 19,800 at Scotiabank Arena.

Jose Calderon, a former Raptor, inbounded the ball under the Toronto basket with 1.2 seconds left. There was a scrum under the basket and Bullock escaped Pascal Siakam, his minder, allowing Calderon to find him alone in the corner of the paint. On the sideline, Casey threw his arms in the air and then pumped his fist as the jubilant Pistons swarmed Bullock.

"They were pulling for me, I appreciate that tremendously," said Casey, Toronto's winningest coach. "It's a players' league, it's about the players, it's not about coaching, it's about players, but again it's about human beings. But those human beings, they felt for me."

"I think it meant a lot to him," Piston forward Blake Griffin said of Casey. "I was proud of the way we came back and responded, and yeah, this was for him, for sure."

Toronto (12-3) seemed to have the game in control for the first three quarters but fell behind after a furious fourth-quarter fightback by Detroit and lost its second straight.

"We just took our foot off the gas a little bit defensively and all of a sudden they're shooting a couple of wide-open threes and that just sparks them," said Toronto coach Nick Nurse.

"Bang, bang, a couple of threes go in and then another one goes in and all sudden all that work you've done for, for let's say 34 minutes, is gone quickly because you just took your foot off the gas a little bit."

Griffin led Detroit (7-6) with 30 points and added 12 rebounds while Andre Drummond had 11 points and 14 rebounds. Reggie Jackson and Stanley Johnson had eight points apiece in the fourth quarter when the Pistons outscored Toronto 29-16.

The 16 points were a season-low for any quarter for the Raptors, who made matters worse by committing eight of their 20 turnovers in the final frame.

Kawhi Leonard had 26 for Toronto while Siakam added 17 and Greg Monroe 14. Kyle Lowry had 14 points and seven assists.

Detroit cut the Toronto lead to 11 going into the final quarter. A 23-9 Pistons run to open the quarter gave the visitors a 100-97 lead with less than five minutes remaining.

A Leonard layup made it a one-point game with 3:19 remaining. And he added a free throw to tie the game at 100-100.

Buckets by Griffin and Drummond made it 104-100 before Lowry scored via layup. Leonard hit a shot to tie it at 104-104. Griffin missed a shot and the Raptors called a timeout with 10 seconds remaining.

Leonard headed to the basket but lost the handle and the ball slipped away with two seconds remaining. Siakam prevented the winning bucket by blocking an attempted alley-oop by Glenn Robinson III.

But then Calderon and Bullock, who finished with five points on the night, worked their magic.

Griffin says Casey's ability to draw up plays is well-known to the Pistons.

"It's not like we just discovered this today. We put in plays like that all the time in practice. He demands execution and we executed. Maybe to Toronto fans or to their GM (Masai Ujiri), maybe it was a surprise, but not to us," he said, seemingly taking a shot at the man who fired Casey.

Lowry said after the game the Raptors needed to do a better job communicating on defence.

Toronto shot just 4-of-20 from three-point range compared to 10 of 33 for Detroit.

The Raptors came into the game looking to match their best-ever start over 15 games (13-2), set in 2014-15.

Toronto had won six straight against Detroit since 2017, its longest winning streak in the series. The Raptors have won or tied the season series with the Pistons since 2012-13.

Toronto went into the game without Serge Ibaka (knee soreness), Norman Powell (shoulder) and C.J. Miles (adductor strain) and lost Danny Green in the third quarter to lower back tightness after he was crumpled by Andre Drummond on a pick play.

Casey drew a crowd, both at the Pistons' morning shootaround and his pre-game availability.

And he was given a standing ovation during the Pistons introductions. Lowry came over to the visitors bench to give him a big hug prior to tip-off.

The Raptors paid tribute to Casey on the video board during a first-quarter timeout. Casey was busy at the Pistons bench drawing up a play but waved to the standing crowd, mouthing thank you as the tribute wound down. Lowry and Jonas Valanciunas were among the Raptors players applauding at mid-court.

The Raptors did not let sentimentality cloud their game. Leonard and Lowry hit their first six shots combined.

Leonard was good on his first four shots and drew a foul on his fifth attempt and fed Siakam, resplendent in sea-foam green sneakers, rather than score himself after a steal.

Valanciunas, starting at centre, was tagged with a pair of fouls in the first quarter. That prompted an early appearance for Monroe who delivered 10 points in 12 first-half minutes.

Toronto's shooting cooled as the first quarter wore on but the home team led 31-25 after the first quarter. Toronto's O.G. Anunoby had the crowd on its feet early in the second with a thundering dunk over the six-foot-11 Drummond and Leonard offered more of the same with a dunk on a three-on-none rush.

The Raptors extended their lead in the quarter and led 65-53 at the break. Toronto shot just 2-of-11 from three-point range (compared to 6-of-17 for Detroit) in the half but had a 30-20 edge in rebounds over the Pistons, a good rebounding side, and had a 44-28 edge in points in the paint.

A 5-0 run at the start of the third extended Toronto's lead to 17.

Monroe got the call again with 5 1/2 minutes remaining in the third when Valanciunas picked up his fourth foul. But it was Toronto guard Fred VanVleet who drew the spotlight, drawing oohs for dribbling past Reggie Jackson like the Piston was a pylon.

The 61-year-old Casey led Toronto to three consecutive 50-win campaigns and four Atlantic Division titles in five seasons.

But after failing to get past the Cavaliers again in the playoffs, Casey was fired May 11 — two days after being honoured with the Michael H. Goldberg Coach of the Year Award by the National Basketball Coaches Association. He went on to win NBA Coach of the Year Award as voted on by the media, in June.

Casey, who was 320-238 in seven seasons in Toronto was hired by the Pistons one month after being let go by the Raptors following a franchise-high 59-win season.

Both teams were coming off losses — Detroit to Charlotte and Toronto to New Orleans.

___

Follow @NeilMDavidson on Twitter