The Toronto Raptors are an NBA-best 26-10 after rallying from a 14-point halftime deficit.
Danny Green's 3-pointer with 22.7 seconds left put the Raptors ahead for good in a 106-104 triumph over the Heat at Miami.
Green had 18 points for the Raptors, who survived a wild fourth quarter that saw 13 lead changes and three ties.
Kawhi Leonard poured in 30 points and Fred VanVleet added 16 as Toronto ended the Heat's five-game winning streak.
Justise Winslow finished with 21 points for Miami.