DENVER -- Danilo Gallinari scored 21 points, Ty Lawson had 20, and the Denver Nuggets rallied to beat the Golden State Warriors 116-105 on Sunday night for their season-high fifth straight win.

Wilson Chandler scored 14 points in his first game in two months for Denver after being sidelined since early November because of pain in his left hip, which was surgically repaired last spring.

Stephen Curry scored 29 points, including seven 3-pointers, to lead Golden State. David Lee added 23 points and 13 rebounds and Harrison Barnes had 21 points.

Down by eight going into the fourth quarter, Denver opened the period with a 19-2 flurry to go up 98-89. Andre Miller and Corey Brewer each scored six points, running the floor and scoring primarily on layups. Kenneth Faried converted a three-point play when he muscled in a dunk and was fouled by Lee.

Lee broke up the flurry with a dunk and Curry conected on successive 3-pointers to pull the Warriors to within 100-97 with 6:10 remaining.

Brewer, who finished with 13 points, and Gallinari hit 3-pointers around a dunk by Gallinari to rebuild the Nuggets' lead to 108-97. Barnes' 3-pointer with 4:00 left cut the Warriors' deficit to nine points but Faried shook loose for a breakaway dunk and the Warriors didn't threaten again.

The Nuggets scored six straight points, including a short turnaround jumper by JaVale McGee to tie the score at 75-all with 3:23 left in the third quarter. Golden State, though, closed out the quarter with a 12-4 run.

Curry's bank shot and a dunk by Barnes started the surge that allowed the Warriors to take an 87-79 lead into the final period.

Curry hit five 3s in the first half, helping the Warriors take a 54-52 lead.

NOTES: Nuggets C Kosta Koufos scored the 1,000th point of his career when he made a hook shot with 6:32 remaining in the third quarter. ... Curry has scored 20 or more points 23 times this season. ... Lee finished four assists shy of a triple double.

Loading Slideshow...
  • Jarrett Jack, Andre Miller

    Golden State Warriors guard Jarrett Jack, left, tries to dribble past Denver Nuggets guard Andre Miller, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Stephen Curry, Kenneth Faried

    Golden State Warriors guard Stephen Curry, left, drives past Denver Nuggets forward Kenneth Faried, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Danilo Gallinari

    Denver Nuggets forward Danilo Gallinari, of Italy, celebrates a three-pointer in the second half of an NBA basketball game against the Golden State Warriors on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Kenneth Faried, Jeremy Tyler, Draymond Green, Harrison Barnes

    Denver Nuggets forward Kenneth Faried, center, puts up the ball over the defense of Golden State Warriors forward Jeremy Tyler, left, forward Draymond Green, bottom left, and forward Harrison Barnes, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Andre Iguodala, Klay Thompson

    Denver Nuggets guard Andre Iguodala, left, drives past Golden State Warriors guard Klay Thompson, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Ty Lawson, David Lee

    Denver Nuggets guard Ty Lawson, left, is defended by Golden State Warriors forward David Lee, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Andre Miller, Stephen Curry

    Denver Nuggets guard Andre Miller, left, drives past Golden State Warriors guard Stephen Curry in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Danilo Gallinari, David Lee, Festus Ezeli

    Denver Nuggets forward Danilo Gallinari, left, of Italy, puts up a shot over Golden State Warriors forward David Lee, right, and center Festus Ezeli, top, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Kenneth Faried, Festus Ezeli

    Denver Nuggets forward Kenneth Faried, left, shoots over Golden State Warriors center Festus Ezeli, right, in the second half of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Carl Landry, Wilson Chandler

    Golden State Warriors forward Carl Landry, left, defends against a jump shot by Denver Nuggets guard Wilson Chandler, right, in the first quarter of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Kosta Koufos, Klay Thompson

    Denver Nuggets center Kosta Koufos, right, defends against Golden State Warriors guard Klay Thompson, left, in the first quarter of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. The Nuggets won 116-105. (AP Photo/Chris Schneider)

  • Harrison Barnes, Kenneth Faried, Kosta Koufos, Danilo Gallinari

    Golden State Warriors forward Harrison Barnes, top, knocks over Denver Nuggets forward Kenneth Faried, bottom, for an offensive foul in the first quarter of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. Denver center Kosta Koufos, rear left, and forward Danilo Gallinari, of Italy, rear right, watch the play unfold. (AP Photo/Chris Schneider)

  • Kenneth Faried, Danilo Gallinari, Carl Landry,

    Golden State Warriors forward Carl Landry, right, is defended by Denver Nuggets forward Kenneth Faried, left, and forward Danilo Gallinari, center, of Italy, in the first quarter of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. (AP Photo/Chris Schneider)

  • David Lee Danilo Gallinari, Kosta Koufos

    Golden State Warriors forward David Lee, right, dunks over Denver Nuggets forward Danilo Gallinari, left, in the first quarter of an NBA basketball game on Sunday, Jan. 13, 2013, in Denver. Denver center Kosta Koufos is at bottom left. (AP Photo/Chris Schneider)

  • Stephen Curry

    Golden State Warriors guard Stephen Curry brings the ball up the floor in the first quarter of an NBA basketball game against the Denver Nuggets on Sunday, Jan. 13, 2013, in Denver. (AP Photo/Chris Schneider)