Chris Webber saved the Kings from a potentially embarrassing loss.
The All-Star forward scored 24 and made a 21-footer with 1.5 seconds remaining as Sacramento stayed unbeaten at home this season with a 101-99 victory Sunday night over the Magic.
Tracy McGrady made two 3-pointers, and Pat Burke tipped in a shot with four seconds left as Orlando rallied from an eight-point deficit in the final minute to tie the game at 99-99.
Following a timeout, Webber took the inbounds pass, and Bobby Jackson went around him to give Webber some room. He quickly put up a shot over Shawn Kemp that went straight in. Darrell Armstrong's desperation shot from near midcourt was not close at the buzzer.
In was only the second game-winning basket in Webber's five seasons with the Kings, who are 5-0 at home.
"I just felt real confident about it before I shot it," said Webber, who had 10 rebounds. "There was a moment of suspense, you're holding your breath until it goes in. I don't care if you've done this a thousand times, it feels good when it happens."
Jackson, who made 10 of 11 shots and had 22 points, said the play was not designed for Webber.
"He was wide open, they (the defenders) followed me," Jackson said. "I thought I was going to get the ball."
McGrady, the NBA's leading scorer, finished with 36 points, 14 rebounds and 7 assists. The Magic lost their second straight and eighth overall at Arco Arena.
Bothered by Doug Christie's defense, McGrady shot 13-for-33.
Orlando's Grant Hill dressed for the game but rested his sore left ankle. Hill, who played 18 games the past two seasons, missed his first game this season.