PHILADELPHIA _ There's no such thing as a must-win game in early November of an NBA season, but the Orlando Magic's game against the Philadelphia 76ers on Tuesday night came close. The Magic had lost their first three games and looked inept for long stretches in each defeat.
The 76ers were supposed to provide the Magic an opportunity.
Orlando made the most of it.
Just barely.
Almost undone by their defense, the Magic recovered from an 18-point deficit in the second quarter and beat the Sixers 103-101 at Wells Fargo Center.
The Sixers made 49 percent of their shots, forcing the Magic to play uphill most of the game.
Evan Fournier tied the score at 101 on a layup with 27.7 seconds remaining.
On the ensuing Philadelphia possession, Elfrid Payton knocked the ball way from Joel Embiid, and the Magic recovered the loose ball, calling a timeout with 5.7 seconds to go.
The Magic lost control of the ball, but it squirted to Serge Ibaka, who was tackled by T.J. McConnell underneath the hoop with 1.4 seconds left.
McConnell was called for a Flagrant 1 foul, which gave Ibaka two free throws, which he made, and then gave the Magic possession of the ball.
Ibaka scored 21 points, none bigger than his final two free throws.
Orlando (1-3) needed the win. So did Philadelphia (0-3).
The game finished with plenty of twists and turns.
The Magic cut the Sixers' lead to 96-95 on a driving dunk by Payton with 4:33 to play.
After Embiid made one of two free throws, Nikola Vucevic missed a mid-range jumper. On the ensuing Philadelphia possession, rookie forward Dario Saric drained a jumper of his own to extend the Sixers' lead to 99-95.
A short while later, Vucevic hit a jumper over Embiid to cut the deficit to 99-97.
The Magic had a few more opportunities on subsequent possessions, but Fournier missed a shot off the glass from 9 feet, Ibaka misfired on a 3-pointer and Payton missed a jumper from 19 feet.
The referees whistled Vucevic for a foul as he attempted to corral a defensive rebound with 1:38 to go. Embiid made both of the ensuing free throws to extend Philadelphia's lead to 101-97.
On the next trip down the court, Embiid recorded his fourth block of the game on a running hook by Vucevic.
The Magic drew within 101-99 when Ibaka scored on a putback layup with 55.0 seconds left.
Vucevic finished with 24 points and 14 rebounds.
Payton added 18 points and 10 assists.
Swingman Hollis Thompson came off Philadelphia's bench to torment Orlando, scoring 22 points on 8-of-10 shooting.
The Magic trailed 57-43 at halftime.
But they made their first 11 shot attempts of the third quarter to cut the Sixers' lead to 72-69 on a fastbreak dunk by Ibaka.
Orlando didn't miss in the third quarter until Aaron Gordon misfired on a wide-open 3-pointer with 5:08 remaining in the period.
The Magic made 16 of their 22 attempts in the quarter and tied the score at 82-82 on a 3-pointer by Fournier with 51.4 seconds left in the period.
The night started terribly for Orlando.
Philadelphia scored the first 10 points, taking advantage of poor Magic defensive rebounding, missed shots and two early turnovers.
Orlando went on a run of its own to tie the score at 19, but it lost ground shortly afterward.
Saric and Embiid made significant impacts.
Saric hit a pair of 3-pointers in the first half.
Embiid, a massive center, missed the entire 2014-15 and 2015-16 seasons due to injuries after the Sixers drafted him third overall in 2014.
He was restricted to 24 minutes of playing time Tuesday night, but he made the most of his time on the court. In the first half alone, Embiid scored 10 points, collected six rebounds and blocked three shots.
The difference in the first half was long-range shooting. Philadelphia went 6 for 11 from beyond the arc. In addition to Saric's two 3-pointers, rookie point guard Sergio Rodriguez made his lone attempt, and Thompson went 3 for 3.
The Magic, on the other hand, misfired badly, hitting only one of their 10 tries. That was the kind of scenario skeptics predicted from Orlando during the offseason.
Orlando would have been in worse shape if not for Vucevic, who played for the Sixers as a rookie before the team included him in the multi-team deal that sent Dwight Howard to the Los Angeles Lakers.
In the first half, Vucevic scored 14 points on 6-of-7 shooting, and he grabbed four of his six boards on the offensive end of the court.