ORLANDO, Fla. (AP) The Orlando Magic could've had a smoother finish, though they couldn't complain about their performance the rest of the night.

Evan Fournier scored 20 points and the Magic survived a collapse from the free throw line in the final minute to squeeze out a 98-97 victory over the Philadelphia 76ers on Friday.

''The end wasn't great, but we can clean that up,'' Magic coach Steve Clifford said. ''That's a good win against a good team.''

Aaron Gordon had 19 points and 11 rebounds, and Nikola Vucevic had 16 points and 12 rebounds for Orlando, which won its second straight.

''It felt like Magic basketball tonight as far as the defense and preparation,'' Fournier said. ''They are one of the top teams in the East and we were ready for a fight. We need to be like that every night.''

Joel Embiid and Tobias Harris each had 24 points and 11 rebounds for the 76ers, who had their three-game winning streak snapped. Embiid missed a desperation 30-footer at the buzzer that could have won it.

Orlando led 93-83 after Gordon's dunk with 1:49 left in the game, but it was far from over. The Magic were 5 of 11 from the free throw line in the final 1:30. That included four misses in the final 30 seconds.

Philadelphia's last four field goals were 3-pointers that gave the visitor's a chance at winning. Embiid hit the last of them with 5.1 seconds to play that cut the Sixers' deficit to 98-97.

Ben Simmons then stole the inbounds pass at the Magic end of the court and gave it to Embiid, who launched his desperation shot as the buzzer sounded. It was short and left and Orlando survived.

''If I'm open I'm going to shoot it,'' Embiid said of his late-game offensive burst. ''That's the mentality you have to have. I didn't make the last one so it doesn't matter.''

The game was a defensive struggle from start to finish. Most possessions were a battle to find an opening somewhere before the 24-point shot clock expired.

Philadelphia had a 47-46 lead at halftime and pushed it to 62-54 early in the second half with the first offensive burst of the game. Embiid had seven points and Harris five as the Sixers took advantage of five Magic turnovers in a three-minute stretch to establish their biggest lead of the game.

Orlando returned the favor, running off nine straight points off Sixers miscues. Vucevic's layup put Orlando up 63-62 and Orlando nursed that the rest of the quarter, taking a 71-68 lead into the fourth.

''It was a playoff-type movement as far as the physical side of it and I thought we responded with a D-minus,'' Sixers coach Brett Brown said. ''It was a statement thing, a physical thing and we responded poorly.''

Both teams spent the first half searching unsuccessfully for a hot hand. Philadelphia's 39-34 lead in the middle of the second quarter was the biggest either team could muster before halftime. There were 13 lead changes and eight ties as the defenses got the best of the action.

TIP-INS

76ERS: Philadelphia, which scored 30-plus points in 10 of its previous 12 quarters, had a high of 29 against the Magic. . Simmons has 38 assists in his last three games. . The Sixers had a chance to tie the game with 24 seconds left, but Simmons turned the ball over on an inbounds play.

MAGIC: C Mo Bamba (ankle) and G Michael Carter-Williams (shoulder) did not play.

UP NEXT

76ERS: At Miami on Saturday night.

MAGIC: At Milwaukee on Saturday night.

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.