DENVER (AP) The Denver Nuggets were down by a lot and playing without their starting point guard early in the third quarter.

Instead of folding, they rallied and got a much-needed home victory.

Danilo Gallinari hit a 3-pointer to put Denver ahead late in overtime and the Nuggets overcame an 18-point deficit in the second half to beat the Minnesota Timberwolves 111-108 on Friday night.

More from FoxSports

Gallinari finished with a game-high 23 points, including nine in overtime. The Nuggets ended a five-game home losing streak.

''I thought we needed a game like that to be able to win in clutch time like this,'' Gallinari said. ''We didn't play very good in the first half and we were able to be much better in the second half. That was great for everybody.''

Gallinari did his part with a standout performance in overtime. It was tied at 104 when he rose up and drained a 3 to give the Nuggets the lead with 1:25 left.

Karl-Anthony Towns, who dominated the Nuggets in their home opener with 28 points and 14 rebounds on Oct. 30, hit a jumper to make it a one-point game. Gallinari answered with a turnaround with 6.8 seconds left. He then hit two free throws with 2.8 seconds remaining.

''Gallinari, who was struggling in the second half, made some real big plays down the stretch, which we needed,'' Denver coach Michael Malone said. ''It was a great way to end that five-game losing streak at home.''

Jameer Nelson had a season-high 20 points and Nikola Jokic scored 19 for the Nuggets, who played the second half without rookie Emmanuel Mudiay because of a sprained right ankle suffered in the second quarter.

Malone said Mudiay hurt the ankle in practice this week and aggravated it during the game.

Andrew Wiggins and Kevin Martin led Minnesota with 22 points apiece.

The Timberwolves led by 15 at halftime and stretched the advantage to as many as 18 in the third before Denver rallied.

Nelson, getting extended minutes because of Mudiay's injury, hit three 3-pointers during a 12-2 run by the Nuggets that cut the deficit to eight.

''I'm never concerned with Jameer,'' Will Barton said. ''He's a vet.''

The Nuggets chipped away until Gary Harris hit a shot in the lane to give them a 95-94 lead with 2:04 left. Nelson's two free throws gave Denver a 100-99 lead but Wiggins made one of two free throws to tie it.

Nelson missed a long 3-pointer at the horn, forcing overtime.

''We couldn't get enough stops and gave up too many 3-pointers in the second half,'' Minnesota coach Sam Mitchell said.

BOARD CHAIRMAN: Timberwolves F Kevin Garnett had four defensive rebounds and passed Hall of Famer Karl Malone for ninth most in the NBA with 11,409. Garnett got the record early in the first quarter and was given a warm ovation by the crowd at Pepsi Center.

TIP-INS

Timberwolves: Towns finished with 14 points and nine rebounds. Minnesota had won two straight in Denver dating back to last season. ... Former Nuggets G Andre Miller did not play for the fifth straight game.

Nuggets: Kenneth Faried had 14 points and 12 rebounds but was just 6 of 15 from the line. ... F Darrell Arthur was out with right knee soreness. Arthur was forced out of Tuesday's loss to Atlanta because of the knee. ... C Joffrey Lauvergne returned to the lineup after missing Tuesday due to an illness.

UP NEXT

Timberwolves: At Phoenix on Sunday.

Nuggets: Host Houston on Monday.