Tyler Johnson scored 22 points in the third quarter and Goran Dragic had 14 in the fourth to help the Miami Heat overcome an 18-point deficit and beat the Orlando Magic 117-111 on Saturday night.

Johnson finished with a season-high 31 points, and Dragic had 25 points and eight assists.

Aaron Gordon led the Magic with 39 points, and Evan Fournier added 23.

Dragic’s baseline runner with 2:03 remaining put the Heat up 107-105 and he added a layup to push the lead to four. After Gordon’s three free throws with 1:12 left, Johnson hit a 3-pointer to give Miami a four-point lead.

The Magic (12-25) lost for the 10th time in 11 games despite shooting 54 percent. The Heat (19-17) shot 63 percent in the second half in winning for rhe eighth time in 12 games

Orlando led 68-50 early in the second half when Johnson led Miami back into the game. He made 10 of 11 shots including a couple of 3-pointers. His only miss of the quarter was a long buzzer shot that left the Heat down 92-86.

Gordon made seven of eight shots and scored 20 points in the first half, leading the Magic to a 16-point lead. Fournier also made six of seven shots and the team shot 67.5 percent in the first half.

Gordon’s 3-pointers helped Orlando finish the half on a 14-5 run for a 66-50 lead.

TIP-INS

Heat: Johnson’s 22-point third quarter was a season high for Miami and only three points short of his personal season high for a game before Saturday night.

Magic: Rookie F Jonathan Isaac will be placed in an injury rehabilitation and conditioning program and will be out indefinitely. Isaac has played only 36 minutes in three games since spraining his right ankle Nov. 11.

UP NEXT

Heat: Host Detroit on Wednesday night.

Magic: At Brooklyn on Monday night.