CLEVELAND -- Isaiah Thomas made two free throws with 11 seconds left and the Cleveland Cavaliers came up with a defensive stop in the frantic final seconds after blowing a 23-point lead to beat the Orlando Magic 104-103 on Thursday night.
After Thomas made his shots, Orlando's Elfrid Payton missed a contested layup with three seconds left. The officials ruled there was an inadvertent whistle and held a jump ball at midcourt.
Magic forward Aaron Gordon grabbed the toss and sank an apparent game-winning 45-footer as the horn sounded and Cleveland's crowds shrieked in disbelief. But Gordon committed a jump-ball violation with the move and Cleveland then only had to inbound the ball to come away with a win that shouldn't have been so difficult.
LeBron James closed in on 30,000 career points, Thomas scored 21 and the Cavs snapped a four-game losing skid -- but not out of a January funk.
James scored 16 and now needs 25 to become the seventh player in NBA history to reach 30,000. He'll likely reach the plateau on Saturday when Cleveland hosts Oklahoma City.
The Cavs were rolling to a rare, easy win before they went cold from the outside and were outscored 33-17 in the third quarter by the Magic, who have dropped 17 of 19.
Cleveland went 1 for 17 on 3-pointers in the second half.
Payton scored 19 and Gordon 17 for Orlando, which didn't get any breaks down the stretch.
With guard Derrick Rose back after missing more than two months with ankle injuries, the Cavs were closer to full strength and for a while they put together a solid performance after dropping nine of 12, a slide that raised questions about their legitimacy to contend for another title.
But some of the same problems that have plagued the Cavs -- defensive lapses, stagnant offense -- resurfaced in the second half.
Rose deepens Cleveland coach Tyronn Lue's rotation to 10, for now, and he pulled all five reserves in the second quarter for his starters.
Lue remains confident the Cavs will work through their struggles, and the Magic were the perfect opponent to fix some issues.
Orlando coach Frank Vogel was worried the Cavs would play better.
"As the season goes on they'll figure it out and they'll get their stuff together and be as good as they've always been," he said.
Cleveland made nine 3-pointers -- more than they had in its previous three games -- while building a 23-point lead in the first half.
CAPTAIN, MY CAPTAIN
Before the game, James was chosen as one of the captains for this year's All-Star game after receiving the most votes in balloting by fans, players and media. James will have first choice from a pool of selected players, which will include former Cavs teammate Kyrie Irving and players from Western Conference teams.
Golden State's Stephen Curry is the other captain.
SITTING OUT
The Magic played without guard Aaron Afflalo, who was suspended two games without pay by the NBA for fighting with Minnesota's Nemanja Bjelica on Tuesday.
TIP-INS
Magic: Afflalo took a wild swing at Bjelica, a punch Vogel knew would result in league punishment. "We'll respect their decision," he said. ... Earlier this season, Orlando snapped a 17-game losing streak against Cleveland. ... Vogel burned some early timeouts to scold his players after they gave up six 3-pointers in the opening minutes. ...
Cavaliers: James will make his 14th straight All-Star start, one behind Kobe Bryant's record. ... James set a goal to play 82 games, and Lue said that's a possibility although it's expected the four-time MVP will be rested for the playoffs. "He has to understand that his health is most important and without that we can't go very far," Lue said. "We just have to be smart about it." ... With James on the cusp of scoring history, Lue, who played 11 seasons, appreciates the accomplishment. "When he came into the league they talked about he was a pass-first guy," Lue said. "But to make guys better and still score 30,000 points, that's a great achievement." ... G Iman Shumpert remains sidelined with a knee injury, but is close to returning.
UP NEXT
Magic: At Boston on Sunday.
Cavaliers: Host Oklahoma City on Saturday.
Check out the team sites for the Orlando Magic and the Cleveland Cavaliers for more game coverage.
(Photo by Justin K. Aller/Getty Images)