OAKLAND, Calif. — Monta Ellis had 39 points and 11 assists, Dorell Wright scored 32 points and the Golden State Warriors came back from 21 points down to stun the Orlando Magic 123-120 in overtime Friday night.

Stephen Curry added 22 points and 12 assists, and the Warriors made a franchise-record 21 3-pointers to highlight a furious second-half push that toppled the Magic in thrilling fashion.

Jason Richardson scored 30 points and Jameer Nelson had 24 points in another underwhelming performance for the Magic against an inferior opponent. They wasted a big lead with a poor defensive effort after the break.

And by the time they tried to pull away again, it was just too late.

The Warriors couldn't miss.

Orlando went back ahead by five in the fourth quarter when Golden State started another rally. Wright and Curry each made a 3-pointer to give Golden State a 98-94 lead with 1:48 remaining.

The teams traded baskets until Ellis turned the ball over with an errant pass that landed in the hands of Nelson. Orlando rushed up court and a wide-open Hedo Turkoglu hit a 3-pointer from the top of the arc with 8.3 seconds left to tie the score.

In a final chance to win it in regulation, Howard deflected a pick-and-roll pass from Curry, and time expired in the scramble for the ball. The extra period provided even more drama.

Ellis finished over Turkoglu with a dazzling layup, his back to the basket as he flicked it off the glass and in for a three-point play to help put Golden State ahead by four. The Magic answered over and over with big baskets of their own. Jason Richardson's 3-pointer brought them back within a point.

Down by two points in the final minute of overtime, Nelson stole the inbound pass and seemingly converted a layup for a three-point play — but Ellis forced a charging call, then made two free throws to put Golden State ahead by four.

The Magic had one last chance to send it to a second overtime, with Turkoglu and Richardson each missing 3-pointers in the final seconds before the buzzer sounded, sending confetti falling from the rafters in one of the biggest wins of the season for Golden State.

It was a scene few could've imagined early on.

The Magic turned things into their own personal highlight show in the first half: Howard spun baseline for an alley-oop dunk from Jameer Nelson, Richardson had another and a flurry of 3-pointers buried the Warriors in a 21-point hole by the second quarter.

All they did from there was blow it.

Golden State came out in the second half with a furious 27-12 run, going ahead 69-68 on Wright's 3-pointer with 4:28 left in the third quarter. The offensive outpouring had Warriors co-owner Joe Lacob out of his courtside seat, high-fiving fans and punching the air in an emphatic celebration.

Magic coach Stan Van Gundy, meanwhile, was furiously stomping his foot in the latest incomplete performance against a team they should have dominated.

The Magic squeaked out a win at lowly Sacramento two nights earlier in similar fashion but couldn't turn things around late this time.

Notes: Magic backup SG J.J. Redick was missed the game after he pulled a muscle in his lower abdomen during the team's morning workout. ... Orlando has several ties to Golden State. Magic guards Jason Richardson and Gilbert Arenas, and Magic president and general manager Otis Smith and player development pointman Adonal Foyle all once played for the Warriors. Smith also worked in Golden State's management after his playing career. ... A moment of silence was held before the game for victims of a powerful tsunami in Japan that was caused by an earthquake Friday.