DENVER (AP) -- Nikola Jokic scored 29 points and grabbed a season-high 18 rebounds, Gary Harris hit two late free throws and the Denver Nuggets led by as many as 23 points before holding on for a 105-102 victory over the Dallas Mavericks on Tuesday night.

Harris finished with 25 points and Will Barton added 22 for the Nuggets, who won for just the second time in six games.

The Nuggets led 82-59 with 4:04 left in the third before Dallas staged a massive comeback. The Mavericks cut the deficit to one on a three-point play by Dennis Smith Jr. with 10.4 seconds remaining. After Harris made two free throws, the Mavericks had a chance for a last-second shot, but Dwight Powell couldn't corral a long pass as the buzzer sounded.

Smith had 25 points for the Mavericks, while Harrison Barnes contributed 17.

Trying to address the issue of slow starts, Nuggets coach Michael Malone tweaked the starting lineup by inserting Barton and sending Mason Plumlee to the bench. The change worked as Denver led at halftime. That's significant because it halted a streak of seven straight games in which the Nuggets trailed at intermission.

Denver made protecting the paint a point of emphasis in this contest. When the Mavericks beat the Nuggets 122-105 on Dec. 4, they dominated points in the paint with 64. That figure comes with a caveat -- Jokic was sidelined with an ankle sprain.

This time, Dallas had 42.

Harris and Jokic combined to score Denver's opening 22 points, before Plumlee got in the scoring act with a free throw late in the first quarter.

TIP-INS

Mavericks: J.J. Barea sat out with a strained groin. He leads the league in total assists (256) off the bench this season. … Dirk Nowitzki is sixth on the NBA's career games played list with 1,439. Next up, Kevin Garnett (1,462). … Reserve Devin Harris had 16 points.

Nuggets: The team had two buzzer-beaters -- Barton on a 3-pointer to end the first quarter and Jokic with a tip-in to close out the second. … Jokic had seven assists.

INJURY UPDATE

Mavericks coach Rick Carlisle said it's looking like at least February until Dorian Finney-Smith (left knee), Nerlens Noel (left thumb) and Seth Curry (left tibia) return.

"Right now Nerlens is on track to be on the floor before any of them," Carlisle said. "If all goes well it's very possible he could be back playing in the first week of February. He's doing well and rehab's going along the way it should."

YOUTH IS SERVED

A reason for Denver's disparity between its home record (16-5) and road mark (7-16) is plain, old youth.

"It's our reality. Jamal (Murray) is 20. That's not an excuse, he's 20 years old," Malone said. "We have a lot of young players and we have to help them get through these tough times."

UP NEXT

Mavericks: At the Trail Blazers on Saturday.

Cavaliers: Travel to the Los Angeles Clippers on Wednesday.