MIAMI (AP) When the Miami Heat are dealing with adversity, Chris Bosh knows how the team will respond.
It's the good times that befuddle the Heat.
DeMar DeRozan scored 30 points, Kyle Lowry added 21 and the Toronto Raptors erased an 11-point, third-quarter deficit to beat Miami 108-94 on Friday night.
The Raptors denied the Heat what would have been their first four-game winning streak since the 2014 playoffs.
''I'm not worried about when this team is on edge, after we've lost a couple or lost a close one or anything like that,'' Bosh said. ''I'm worried about when we win three or four in a row, maybe when we get to five, God willing. A team can beat you but they have to beat you at your best. And we weren't even close to our best tonight.''
The Heat had been 12-0 when facing Toronto with Bosh in the lineup against his former team.
''I'll let him know,'' DeRozan said. ''It's just crazy how long it's been. All of the years playing with him and all the times playing against him ... just finally beating him.''
Luis Scola scored 20, Terrence Ross finished with 17 and James Johnson added 13 for the Raptors, who outscored Miami 58-39 after halftime. Each of Miami's last seven three-game winning streaks has now been immediately followed by a loss, including three already this season.
Dwyane Wade scored 21 points, Gerald Green had 20 and Goran Dragic scored 18 for the Heat. Hassan Whiteside had 13 rebounds and Bosh finished with 11 points.
''I liked the way we competed,'' Toronto coach Dwane Casey said. ''I thought we came out of the locker room in the second half, third quarter, juices flowing a little bit.''
Down 64-53 early in the third, the Raptors made 13 of their next 16 shots - Whiteside blocked two of the three misses in that stretch - and turned the game around with 26-8 run. Ross' 3-pointer late in the third capped the flurry, putting Toronto up 79-72.
Miami scored to get within three points or less on six separate occasions after that, including Wade's layup with 6:12 left that cut it to 90-89. But Toronto never got caught, and Lowry got the roll on a layup with 2:25 left to put the Raptors up 10 and wrap up the win.
''I think it would be a discredit to them to say it was all just an exhale on our part,'' Heat coach Erik Spoelstra said. ''They really stepped up their defensive pressure ... and we were never able to get it back.''
Raptors: Lowry was 3 for 17 from 3-point range on Thursday; he was 1 for 4 from beyond the arc Friday. ... DeRozan got hit in the face by Johnson as they went for the same rebound in the third quarter. DeRozan got it, and made a jumper moments later. ... The Raptors were again without Jonas Valanciunas (left hand) and DeMarre Carroll (right knee).
Heat: Wade passed Bob Lanier (19,248) for 46th on the NBA's career scoring list. He started this season 54th. ... Dragic's 11-point first quarter was not only a season-best, it topped his 10-point total from his last five opening quarters combined. ... Fours were wild: Green had a four-point play in the second quarter, breaking a 44-44 tie.
Toronto shot 72 percent in the third quarter, its third-best showing in any quarter this season. It was also a season-worst for the Heat, who hadn't allowed anyone to shoot better than 67 percent in any quarter coming into Friday.
Plenty of college teams just happened to be in the stands Friday night. The football teams from Western Kentucky and South Florida - they'll meet Monday in the Miami Beach Bowl, an oddly named game since it isn't played anywhere near Miami Beach - were on the floor in the first half for a shooting contest. And the Plattsburgh State men's basketball team from upstate New York was also at the game, in town for a weekend tournament.
Raptors: Host Sacramento on Sunday.
Heat: Host Portland on Sunday.