With six-tenths of a second left, the Magic inbounded the ball at midcourt with a lob into the paint, but the clock started prematurely, and the buzzer sounded as the ball was still in the air, before it touched anyone or anything.
Because there was an error with the clock, officials said the teams must have a jump ball at center court. Lakers center Brook Lopez then tapped the ball safely away as the clock expired to give the Lakers the win.
"We feel cheated," Orlando forward Aaron Gordon said afterward. "... They gave them the game. ... It's just a terrible end to a game of basketball. They didn't even give us a chance to win. And that's the last time we see them [the Lakers]. We have to wait a year to play them again. They [the NBA] have gotta change that rule, and I think they will."
The Lakers had blown a nine-point lead in the final two minutes, allowing the Magic to go on a 10-0 run to take a 107-106 lead with five seconds left. Lopez was fouled on the next possession and made two free throws to give the Lakers the lead again, setting the stage for the strange finish.
The inbounds play was reviewed by the NBA's replay center in Secaucus, New Jersey, where the ruling was made to have a jump ball at center court because of the clock malfunction.
NBA crew chief Bill Spooner explained the rule to a pool reporter afterward.
"Because there's no possession when the clock goes off, the ruling is that there's a jump ball, center circle," Spooner said. "The rule is 13E-9-2. And anytime there is either an inadvertent whistle and/or a horn when the ball is in the air, there's no possession and we go center circle, jump ball."
Several Lakers said afterward they had no idea what the rule was or why the game ended the way it did. Lakers point guard Isaiah Thomas said, simply, that the official explanation was "weird."
"I still don't even know how it ended," Thomas said, echoing a sentiment that was expressed throughout the Lakers' locker room. "I don't even know what the call was or whatever the case may be. But I am just glad we won. ... I mean, that sucks for the Magic. I am glad we won."
Lakers rookie Kyle Kuzma said, "I have never really seen nothing like that before. But it worked in our favor. ... It helped us get a win, kind of really saved us."
Orlando head coach Frank Vogel vehemently argued with officials and personnel at the scorer's table before slamming his clipboard on the table in protest as the ruling was made on the court.
"They took the ball from us and made it a jump ball with 0.6 seconds, which kills any chance of us tying the game or winning the game," Vogel said. "I don't know. It's just common sense would tell me that in that situation, the clock started early, that you do redo the possession. They felt otherwise."
Gordon, who finished with 28 points and 14 rebounds, said he felt the officials handed the Lakers the victory.
"I mean, obviously you have to change the rule," Gordon said. "It's an inadvertent whistle. A foul down the stretch [before that]. We just played perfect defense and they called a foul. They gave them the game. For the most part, the referees did a good job throughout the game. Just down that stretch, it's bad.
"It's bad. So they have gotta change the rule -- inadvertent whistle. They didn't even give us a chance to win the game. That's not how you play. That's not how the game of basketball should go."
ESPN's Jovan Buha contributed to this story.
Lakers beat Magic in bizarre ending
Brook Lopez scores 27 points and the Magic lose a possession at the end of the game in a 108-107 loss in Los Angeles.