Gordon Hayward scored a tiebreaking basket on a drive into the lane with 0.7 seconds left to give the Charlotte Hornets a 107-104 victory against the host Orlando Magic on Sunday night.
Hayward scored 13 of his 39 points in the fourth quarter, helping Charlotte snap a season-worst four-game losing streak.
Terrence Ross hit a 3-pointer with 8.7 seconds left for Orlando to tie the game at 104-104, capping an 11-2 run.
After Hayward's go-ahead shot, the Magic were called for a 5-second violation trying to inbound the ball. Hayward, who also had a team-high nine rebounds, then tacked on a free throw.
Nikola Vucevic poured in 22 points and Evan Fournier had 21 points for the Magic, who had a third game in a row decided in the final second. It won only one of those.
Gary Clark and Cole Anthony both had 14 points for the Magic, which made 17 shots from 3-point range. Clark had four of those, with each of the team's starters and two reserves connecting on at least two 3-pointers apiece. Ross ended up with 10 points.
Fournier was defending against Hayward on the game's final field goal. Orlando has lost eight of its last nine games.
Hayward shot 15-for-25 from the field. Teammate Miles Bridges had 18 points off the bench, Devonte Graham had 15 points and LaMelo Ball added 11 points and eight assists.
The Hornets were down by 14 points in the third quarter before putting together a rally.
Charlotte, which had been plagued in recent games by turnovers, limited their giveaways to 12. Orlando had 16 turnovers.
The Hornets prevailed despite shooting just 9-for-16 on free throws. They scored 33 fourth-quarter points after not scoring more than 26 in any quarter earlier in the game.
It was the first of two meetings in two nights between the teams in Orlando.