DENVER (AP) — Danilo Gallinari hit a 3-pointer to put Denver ahead late in overtime and the Nuggets rallied to beat the Minnesota Timberwolves 111-108 on Friday night.

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

It was tied at 104 when Gallinari 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.

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.

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