DENVER — Remember that flair and joy that had left Nikola Jokic’s game over the better part of the past couple of weeks? Well, it was back at Pepsi Center Tuesday night.

Behind a 29-point, 18-rebound, seven-assist effort from Jokic, the Denver Nuggets beat the Dallas Mavericks 105-102 for just the second win in its last six tries.

Denver didn’t make life easy for themselves. The Nuggets surrendered a 20-plus point second-half lead as Dallas came all the way back to trail but just four points with 17.6 seconds remaining. Gary Harris then missed two free-throws as Dennis Smith Jr’s and-one layup closed Denver’s margin to within one. Harris then converted two free-throws to give the Nuggets a three-point lead with 1.7 seconds remaining as the Mavericks couldn’t get off a potential game-tying three-pointer on the game’s final possession.

Much of Denver’s recent struggles had to do with poor shooting, tired legs and what Nuggets coach Michael Malone called “mental fatigue” as Denver looked out of sorts over its recent stretch of games. The Nuggets had uncharacteristically dropped games to NBA bottom-feeders like the Hawks, and Kings as of late.

Some of those shortcomings also fell on Jokic’s shoulders, who had been caught in the biggest funk of his three-year run in Denver. He posted just eight points on 3-10 shooting in Sacramento earlier this month but responded with a 26-point, 12-rebounds effort a night later in Golden State after a late-night pep talk from his coach. But the Serbian only scored nine points a few nights later against Atlanta and tallied 13 versus Memphis.

After 23 points in San Antonio on Saturday and tonight’s commanding performance, Jokic officially has his mojo back. Behind-the-back passes resulting in SportsCenter Top-10 worthy baskets returned to Jokic’s arsenal. The 22-year-old was yapping with Mavericks’ players, officials and directing his teammates on offense within the realms of Denver’s attack.

It was a much-needed victory that came on Jokic’s shoulders.

After a contested opening 12 minutes where a Will Barton buzzer-beating three gave the Nuggets a three-point lead at the end of the quarter, Denver’s offense got rolling. The Nuggets shot a clean 50 percent from the field in the first half and outscored the Mavericks 25-21 in the third quarter. Dallas trimmed Denver’s more than 20-point lead to four with under two minutes remaining in the fourth as both the Nuggets’ offense and defense collapsed.

Barton, who started for Denver as Malone reshuffled his starting lineup, scored 22 points on 9-15 shooting. It was his best outing over the past few weeks as well. Harris chipped in 25 points in 37 minutes.

Denver is in Los Angeles Wednesday for a back-to-back against the red-hot Clippers who have won five in a row and eight of their last 10.

Harrison Wind

Harrison Wind is the Denver Nuggets beat reporter for DNVR Nuggets. The University of Colorado alum grew up in Boulder and has covered the Nuggets for the last three seasons. You can hear him every weekday on the DNVR Nuggets podcast.