ATLANTA -- Jason Terry felt as if he had the game in his hands and let it slip away.
Shammond Williams stole the ball from Terry moments after Tracy McGrady hit a go-ahead jumper, helping the Orlando Magic rally past the Atlanta Hawks 105-102 Saturday night.
"I can't let that happen," Terry said, his voice barely above a whisper.
McGrady had 30 points for the Magic, who won for the third time in four games after losing 19 straight. Williams made five free throws in the final minute to complete a rally from an eight-point deficit.
"I took a gamble," Williams said of his play. "But I felt comfortable with the gamble, and it turned out to help us."
Shareef Abdur-Rahim had 25 for the Hawks, who have lost seven of their last eight games. Stephen Jackson added 20 points and Dion Glover had 19.
"That was a tough loss there," Terry said. "It hurts pretty bad."
Atlanta led 96-88 after Abdur-Rahim made two free throws with 3:24 left, then went about three minutes without scoring.
During the drought, the Hawks missed three shots and had three turnovers, including two straight by Terry.
First, after Orlando closed within one on a three-point play by Williams, Terry slipped while moving around the 3-point line, then flung the ball into the backcourt. The violation forced a timeout by the Hawks, but McGrady made them pay anyway.
He calmly dribbled at the top of the key, then made a jumper with Jackson's hand right in his face to give the Magic a 97-96 lead.
"It showed the character in this team, just keeping our composure when we were down," McGrady said. "When we were down one, I got a chance to take the lead with the next jumper, and I knocked it down."
The Hawks pushed the ball up quickly after McGrady's shot, and Williams stole the ball cleanly from Terry near halfcourt. That led to the first two free throws by Williams, who scored 15 points in place of starting point guard Tyronn Lue, who was out with a strained right hip flexor.
"He just turned up his defense, and I let him take it from me," Terry said. "That just comes down to me taking care of the ball."
Still, Atlanta had a chance, trailing by only three. But Jackson made a bad inbound pass that was stolen by Williams, and the Magic held on.
"I like being in the game in the clutch, and my teammates have confidence in me," Williams said. "They know that I'm a clutch player so they make sure I get the basketball."
Glover had his best effort since his lost his spot in the lineup after 19 games to rookie Boris Diaw. With Diaw out with a sprained left ankle, Glover still didn't start, but played 30 minutes, his second-most since falling in disfavor with coach Terry Stotts.
Notes: Jackson finished with six turnovers, and the Hawks were outscored 25-10 in turnover points. ... Orlando coach Johnny Davis found an interesting way to finish an argument with referee Jim Clark in the first quarter. After Clark told to him to stay in the coaches' box, Davis simply hollered "Merry Christmas, Jimmy." Clark stifled a laugh, then returned the farewell.