DENVER (AP) — Jamal Murray struggled to find his range or rhythm for most of the game.

Then, crunch time hit. Like that, he was locked in.

Murray scored seven of his 14 points over the final two minutes, Nikola Jokic had his eighth triple-double of the season and the Denver Nuggets rallied to beat the Miami Heat 124-119 on Friday night.

”To come back and get a win against that team is definitely a great win,” Nuggets coach Michael Malone said.

Jokic finished with 19 points, 12 rebounds and 12 assists. The two-time reigning NBA MVP was 8 of 15 from the floor, marking his team-record 26th straight game shooting 50% or better. He has 84 career triple-doubles.

With Denver down 117-115, Murray took over as the point guard scored seven straight points- a 3-pointer, two free throws and a floating jumper – to help the Nuggets remain tied with New Orleans for the top spot in the Western Conference.

”Just proud of our guys to stick with it tonight,” Malone said. ”Jamal staying with it, not dropping his head, but also our team.”

Kentavious Caldwell-Pope led the Nuggets with 20 points on a perfect night shooting – 7 of 7 from the floor, including 4 for 4 from 3-point range, and 2 of 2 from the free throw line. The Nuggets had eight players score in double figures to offset 20 turnovers.

”Our communication is a big part of taking that next step and becoming a championship-caliber team,” said Caldwell-Pope, who had a flagrant foul for not giving Tyler Herro enough room to land following a shot with 2:23 remaining. ”Our fourth-quarter defense and offense is great. … But now our goal this just try to do it throughout the 48 minutes and not wait on the fourth quarter.”

Herro had 26 points and 10 rebounds for Miami. Bam Adebayo added 22 for the Heat, who began a five-game trip through the West.

Duncan Robinson connected on three long-range shots to become the franchise’s leader in 3-pointers with 807, one more than Tim Hardaway.

”You want to do it in a win, so that’s disappointing,” Robinson said. ”Just feel very fortunate to get it. … I’ll definitely take a second to appreciate it.”

Miami rebounded from a horrific shooting start – 4 of 22 – to keep things close until making a move to start the third quarter. The Heat took the lead early in the third on Herro’s 3-pointer – and led by as many as nine – but couldn’t hold on.

”We pride ourselves in being able to win games with defensive stops going down the stretch,” Heat coach Erik Spoelstra said. ”I can’t recall a stop in the last three or four minutes. It seems like they were scoring or being fouled on each one of those possessions.”

TIP-INS

Heat: Herro hit all four of his free throws to run his streak to 24. It’s the fourth-longest streak of his career. … Spoelstra drew a technical foul in the third quarter for arguing. Kyle Lowry had another in the fourth quarter. … Forward Caleb Martin was scratched because of a quad injury.

Nuggets: Bones Hyland had five 3-pointers and 16 points. … Aaron Gordon had 11 points. He also drew a technical foul in the second quarter.

POP QUIZ

Malone was asked if this was an important test, given Miami’s physical brand of basketball.

”Every night is a test. I mean that sincerely,” Malone said. ”We know that they (the Heat) are capable of doing really big things in that Eastern Conference.”

UP NEXT

Heat: At Utah on Saturday night.

Nuggets: Host Boston on Sunday night.