DENVER (AP) Foul trouble kept Nikola Jokic from playing more minutes the past two games. He showed what he can do when he stays on the floor.

Jokic had 27 points and 15 rebounds, Gary Harris scored a career-high 24 points and the Denver Nuggets beat the Dallas Mavericks 117-107 on Monday night.

Jokic finished an assist shy of his first career triple-double and tied his career high in points to help the Nuggets win their third straight game. Emmanuel Mudiay scored 18 points.

Jokic averaged only 20 minutes in the first two games of the homestand after committing five fouls each game. It derailed potential big nights, but he had just one foul against the Mavericks and dominated.

”Mike told me he was going to beat me if I made more stupid fouls,” Jokic said of coach Michael Malone. ”I listened.”

Deron Williams led Dallas with 23 points and eight assists.

Denver’s recent offensive surge started after its 20-point loss in Dallas on Dec. 12. Malone shook up his starting lineup and the Nuggets have responded by scoring 30 or more points in eight of the last 12 quarters and are averaging 125.3 points since the change.

They’ve gotten it done with contributions from different players and Harris was a big contributor Monday. The third-year guard out of Michigan State is averaging 19.3 points since returning from a foot injury.

”He has three games back and I don’t think it’s a coincidence that we have won three games in a row,” Malone said.

Harris got the Nuggets started early, scoring 16 in the first half as Denver overcame a 16-point deficit to lead by two at the break. The lead grew to 12 in the third but Dallas made a run to get within six late in the fourth. Jokic hit a 3-pointer, a short jumper and fed Wilson Chandler for a layup for his ninth assist.

”When you have a guy playing that well you want him to get it,” teammate Jameer Nelson said of the triple-double. ”That’s a heck of an accomplishment for an individual. It means he’s playing the game the right way.”

Jokic had a chance for his 10th assist but Mudiay missed his only 3-pointer off a pass. Jokic wasn’t concerned about missing out on the feat.

”It doesn’t really matter,” he said. ”The game is more important than your name.”

The Mavericks ran out of gas after playing Sunday afternoon.

”They wore us down as the game went on,” Williams said. ”They came out and hit a lot of 3s in the second half and got the lead. We battled but we couldn’t outlast them.”

TIP-INS

Mavericks: G J.J. Barea returned to the lineup after missing a month with a strained right calf. He had 11 points in 13 minutes. … Andrew Bogut (right knee) and Dirk Nowitzki (right Achilles) are hoping to return for the start of 2017.

Nuggets: G Jamal Murray played despite a sore right foot. He had three points in 14 minutes. … C Jusuf Nurkic didn’t play a game after logging just eight minutes.

TALL TALE

Mavericks coach Rick Carlisle joked before Monday’s game that Jokic was taller than his listed 6-foot-11.

”That’s (ridiculous). He is probably like 7-4,” Carlisle said. ”His arms are crazy long. He’s a guy that’s plays an on-the-floor game but he is some player. Some of his passing is ridiculously creative and he can make shots. We know he can grab it and put in the basket because he did it about six times last game.”

He was equally impressed after Monday’s performance.

”He kicked our (butt) last game too,” he said. ”It’s not a surprise; he’s good.”

UP NEXT

Mavericks: At Portland on Wednesday night.

Nuggets: At the Los Angeles Clippers on Tuesday night.