Danny Green provided the big basket as the Toronto Raptors won for the second time since a NBA season-worst three-game losing streak.
Green nailed a jumper from the left side of the lane with 0.5 seconds left to give the Raptors a 93-91 victory at Orlando.
Toronto blew an 18-point, first-half lead and were tied at 91 when Green took Kyle Lowry's inbounds pass and scored the last of his 13 points.
Kawhi Leonard had a team-high 18 points and Serge Ibaka added 14 with nine rebounds as the Raptors improved to 14-4.
NBA action Wednesday includes the Raptors taking on the Hawks in Atlanta.