Game on the line, LeBron James knew he was going to get to the rim.

And he delivered.

James scored 26 points, including a go-ahead layup after getting past DeQuan Jones with 3.2 seconds left, and the Heat scrambled late to beat the Orlando Magic 97-96 on Wednesday night and extend their franchise-record winning streak to 16 games.

”I had no intention of shooting another jumper,” James said.

He missed a pair of 3-pointers about 90 seconds earlier, so he went for the 3-footer instead. From the right wing, James drove diagonally through the lane, then used his left hand - after all, he is left-handed - for the basket that won it for Miami. It was the first time he came up with what became a game-winning basket in the final five seconds of a game since a 3-pointer beat the Magic in the 2009 playoffs, according to STATS LLC…

Dwyane Wade scored 24 points on 10-for-16 shooting - he’s now shooting 62 percent in his last seven games - and Chris Bosh added 17 points and 10 rebounds for the Heat, who blew a 20-point, second-half lead and then rallied from a five-point deficit in the final minutes.

Nik Vucevic had 25 points and 21 rebounds for the Magic, who got 16 points apiece from Jameer Nelson and Tobias Harris, 13 from Arron Afflalo and 12 from Maurice Harkless…

The foul discrepancy in the game - 30 for the Magic, 17 by Miami - was a hot topic in the Orlando locker room afterward. The Magic went 10 for 12 from the foul line, Miami 27 of 31.

– Reported by Tim Reynolds of the Associated Press