SAN ANTONIO — The Orlando Magic's best victory of the season was almost their most deflating loss.
Aaron Gordon scored 26 points and Orlando held on to beat the San Antonio Spurs 117-110 on Sunday night after nearly blowing a 26-point lead with 9 minutes remaining.
D.J Augustin added 18 points for Orlando, which made 12 3-pointers in scoring a season high.
"It's a great feeling to get a good win on the road against a great team like that who's playing well now," Augustin said. "It's great for our confidence it's what we've been looking for to get us going in a good direction."
DeMar DeRozan had 25 points as San Antonio's four-game winning streak came to an end on the second night of a back-to-back.
"No excuses, everyone has back-to-backs," said Spurs forward LaMarcus Aldridge who added 14 points. We just came in and we didn't play as good at defense as we can. We'll get better and be better at it next game.
Orlando snapped a four-game skid, but had to bring its starters back into the game to preserve the victory.
The Spurs went on a 25-6 run over 6 minutes to erase the Magic's 105-79 with 9:02 remaining and close within five points with less than 2 minutes left.
"We can't let go, we can't take our foot of the gas," Gordon said. "You've got to be able to finish thoroughly or teams will come back."
San Antonio veteran Pau Gasol sparked the run by blocking and collecting Gordon's shot and racing downcourt, where he was fouled with 7 minutes remaining. Gasol's hustle led Spurs coach Gregg Popovich to reinsert DeRozan, LaMarcus Aldridge, Patty Mills and Bryn Forbes back into the game despite Orlando leading by 18 points.
The Spurs responded with a 9-2 run to pull within 107-96 with 5:28 remaining and forced Magic coach Steve Clifford to take a timeout to slow the momentum.
Clifford was forced to take another timeout 2 1/2 minutes later when Bryn Forbes' 3-pointer cut Orlando's lead to 111-104.
"We had the game at a place where were ahead by enough and that's where we stopped playing defense and they took advantage of it," Clifford said. "That three-minute stretch in the fourth quarter, where they were good and we lost our concentration, except for that, I thought our defense was good all night."
Gasol's 3-pointer pulled the Spurs within 113-108 with 1:41 remaining, but the Magic were able to salvage the win and preserve their best offensive performance of the season.
Orlando failed to score 100 points in its three previous games, but jumped out to an early lead.
"They deserve a lot of credit," Popovich said. "They were really efficient offensively and haven't been all year. They've been at the bottom of the league in offensive efficiency and a lot of it is because it's a new system."
Mills finished with 16 points and Gasol finished with 12 points, eight rebounds and five assists in 23 minutes.
Terrence Ross added 17 points off the bench for Orlando.
Magic: Orlando entered the game last in the league in scoring at 99.9 points per game as well as field goal percentage at 41.4. ... Former Spurs forward Jonathon Simmons received a warm ovation upon entering the game late in the first quarter. Simmons, who was listed as questionable with bruised right wrist, had no points in 18 minutes. ... Jonathan Isaac did not play due to a sprained right ankle. ... Timofey Mozgov missed the game with sore right knee.
Spurs: Jakob Poeltl played 14 minutes, including starting the second half. It was the most minutes Poeltl has played since logging 13 minutes against Indiana on Oct. 24. He finished with two points and five rebounds. . Marco Belinelli finished with 15 points, one shy of his season high. Belinelli was 2 for 5 on 3-pointers.
DeRozan is averaging 1.1 steals per game, which matches his career high, and is on pace to collect the most steals in his career in a season.
DeRozan is adapting to the Spurs' defensive system and has collected most of his nine steals by stepping into passing lanes.
"It's got nothing to with me or what I'm doing," Popovich said. "He's a good basketball player. He's been an All-Star for I don't know how many years. He does all those things. He's a very good player."
Rudy Gay missed his first game of the season, sitting out due to right heel soreness. Popovich downplayed the severity of the injury by saying Gay was sitting out because "he has other things to do."
Magic: Host Cleveland on Monday night.
Spurs: At Miami on Wednesday night.