DENVER -- Danilo Gallinari scored 28 points and the Denver Nuggets withstood a 38-point performance by Stephen Curry to hand the Golden State Warriors their third loss of the season, 112-110 on Wednesday night.
The defending NBA champion Warriors (36-3) had won seven straight since their previous defeat, 114-91 at Dallas on Dec. 30.
Harrison Barnes added 18 points and Klay Thompson had 17 for the Warriors.
Will Barton scored 21 for the Nuggets, who snapped a four-game losing streak to the Warriors. Gary Harris added 18 points.
A dunk by Brandon Rush gave the Warriors a 68-64 lead, but Denver outscored Golden State 19-5 over the last 5 1/2 minutes of the third quarter to take a 10-point lead into the fourth.
Layups by Curry and Andrew Bogut cut the deficit to 102-97 with 2:05 remaining. Curry, who scored 20 points in the fourth quarter, and Barton then traded 3-pointers before Darrell Arthur hit a jumper with a minute left for a 109-102 Denver lead.
But the Warriors fought back, getting a layup from Barnes and a 3 from Curry sandwiched around a Nuggets turnover, pulling to 109-107 with 37.1 seconds left.
With the Warriors in position to tie or go in front, Gallinari stole the ball from Curry, prompting a fast break that ended in Gary Harris being fouled and making a pair of free throws.
Thompson hit a 3-pointer with 3.4 seconds remaining to pull the Warriors to 111-110. They fouled Gallinari intentionally and he made one of two free throws, but Thompson missed a long jumper at the buzzer.
The Warriors, who trailed by as many as 10 earlier, pulled to 55-54 at halftime on Barnes' jumper in the final seconds of the second quarter.
Gallinari had 15 points in the first half, including a reverse layup that preceded Barnes' final shot in the second quarter to keep the Nuggets on top at the break.