The Nuggets led by as many as 16 points and led throughout most of the game against the Magic on Wednesday night until the last minute and 30 seconds. Orlando went on a 15-4 run to close it out and beat Denver 108-103, snapping its 7-game losing streak.

“You can’t play one quarter of defense and expect to win,” Michael Malone said. “We got lucky in Miami. We played a half of defense and we won. Tonight we defended in the first quarter and after that we didn’t defend anyone and the thing that continues to stand out is our inability to defend the paint.”

Orlando scored 66 points in the paint. Ten of those points came in the first quarter. The Nuggets became complacent with a 16-point lead and let the Magic run all over them.

“Sometimes human nature kicks in when you think everything is rolling your way, you think the team is going to lay around and just lollygag but this is the NBA and we learned that tonight,” Monte Morris said. “Hopefully we learn from it. I sure did.”

Morris was Denver’s leading scorer and had a season high 22 points on 10 of 15 shooting from the field. Nikola Jokic had 18 points, 15 rebounds and seven assists but went 0 for 5 from downtown.

Cole Anthony led the Magic with 24 points, eight rebounds and seven assists and Wendell Carter Jr. added 18 points and eight rebounds but it was Franz Wagner who hit some clutch buckets down the stretch to take the lead. He finished the night with 15 points on 6 of 9 shooting from the field.

The Nuggets opened the first quarter on an 8-0 run shooting 57 percent from the field. The Magic struggled shooting and went 25 percent to start. Jokic scored three straight for Denver midway through and had seven points and eight rebounds. The Nuggets then went on a 7-0 run. JaMychal Green scored four straight and then Zeke Nnaji hit a three to give the Nuggets a 29-15 lead.

Denver maintained its lead throughout most of the second quarter until Mo Bamba cut the lead down to eight with seven minutes left. The Nuggets went stagnant on the offensive end for two minutes forcing a timeout. Out of the timeout, Aaron Gordon scored eight straight for Denver extending the lead back to 11. It was the Jokic and Morris show to close the second. They combined for 13 points to give the Nuggets a 63-47 lead at halftime.

Orlando opened the third quarter with all the momentum going on a 6-0 run to get to within 10 points. The Magic went 4 for 5 from the field while the Nuggets were 0 for 3. Halfway through the quarter, Orlando continued shooting the lights out going on a 12-3 run. Carter Jr. scored 11 points to cut the deficit to five. The Magic had a 16-2 advantage in the paint but Denver managed to hang on to the lead 83-79.

To open the fourth, Orlando went on an 9-5 run to get within one point. Denver still had an 89-88 lead until Morris hit a three and Jokic swished a jumper to extend that lead 95-90. But then Anthony went off, igniting a 6-0 run for Orlando and tying it up at 99 with four minutes left. Morris responded with another jumper to take the lead back but Anthony answered the call again to tie it. Jokic went up for a basket but Bamba was there to block it. Orlando had the ball with 1:45 left to go and Wagner knocked down a three to take a 106-103 lead.

Denver had several opportunities to tie up but no one wanted to shoot the ball. Gordon attempted a 3-pointer and missed and then they had one more chance to tie it with 2.9 seconds left. Barton went up for the 3-pointer and missed it. He wanted a foul call but didn’t get it. The Magic stole the game in a 108-103 thriller.

“We have been better,” Morris said. “But in the Miami game we played defense like two quarters of that game and this game we only played defense in one quarter. We just got to string it all together and we have early in the season. We were flying around and we were the number two defense but that’s when shots weren’t going in so we had to do something to try to win games. I think now that we’re starting to make shots and clicking, we’re just taking the brakes off the defensive end because we think we can outscore everybody.”

Denver falls to 10-11 on the season and have five more road games including the Knicks this Saturday.