LeBron James landed a lay-up with 3.2 seconds left as the Miami Heat edged out the Orlando Magic 97-96.
James finished with 26 points in total as the Heat extended their winning streak to 16 games - although they made life hard for themselves.
Miami had been leading by 20 points in the second half before the Magic rallied to move five points clear with Nic Vucevic picking up 25 points and 21 rebounds.
However Dwyane Wade chipped in with 24 points and Chris Bosh added 17 points and 10 rebounds to help the Heat home.
The Boston Celtics came back from 14 points down in the fourth quarter to defeat the Indiana Pacers 83-81.
Kevin Garnett (18 points, 10 rebounds) found Jeff Green all alone under the basket for a lay-up with 0.5 seconds remaining to complete the recovery win.
The Cleveland Cavaliers defeated the Utah Jazz 104-101 despite trailing 100-92 with less than three minutes to go, Kyrie Irving scoring 20 points.