PHILADELPHIA (AP) Serge Ibaka sank two free throws with 1.4 seconds to snap a tie game and send the Orlando Magic to a 103-101 victory over the Philadelphia 76ers on Tuesday night.

The Magic rallied from an 18-point deficit to win for the first time in four games this season.

Sixers center Joel Embiid lost his dribble at the top of the key and Orlando snagged the ball with 5.7 seconds left. Sixers guard T.J. McConnell was whistled for a flagrant foul on Ibaka’s layup attempt. Ibaka made both and the Magic retained possession and kept the Sixers winless.

Embiid had two costly turnovers in the final minute for the Sixers.

Ibaka scored 21 points and Nik Vucevic had 24 points and 14 rebounds.

Hollis Thompson led the Sixers with 22 points. Embiid had 18 points and 10 rebounds, and Dario Saric scored 21 points.