Updated

Oakland, CA (SportsNetwork.com) - Stephen Curry's 3-pointer with 4.2 seconds left lifted the Golden State Warriors to a 98-97 win over the Orlando Magic on Tuesday.

With Golden State trailing by two, Elfrid Payton missed a wild layup attempt and Draymond Green pulled the rebound down with 6.9 seconds on the clock.

Green then quickly found Curry, who calmly dribbled up court, gave a shake of the shoulders as he gained separation from Tobias Harris and canned the winning 3.

Orlando called a pick for Harris on the final play out of a timeout, but Green batted the inbounds pass down court and time expired.

"From my view of what I was seeing, I just wanted to make a move and create some space," Curry said. "I wanted to go to my left and go down the middle, go to the basket and maybe get fouled. (Harris) kind of bit on the in-and-out move and I was able to get a rhythm shot."

Golden State has now won 10 straight games, which is the longest streak in franchise history since an 11-game run from Dec. 29-Jan. 22, 1971-72. The Warriors (15-2) have also tied Memphis for the best record in the NBA.

Curry scored 22 points and fellow sharpshooter, Klay Thompson, netted 20 in the win. Harrison Barnes posted 14 points and 12 rebounds.

Victor Oladipo poured in a season-high 27 points on 10-of-14 shooting for the Magic, who have lost four straight to the Warriors.

Kyle O'Quinn chipped in with 21 points and 11 rebounds starting in place of Nikola Vucevic, who was a late scratch due to back spasms.

"It's part of sports. There is going to be one winner and one loser," said Magic coach Jacque Vaughn. "I appreciate the effort."

Earlier in the fourth, Payton drove the lane and kicked out to Oladipo, who nailed a contested 3-pointer for a 93-84 lead with 4:11 left.

Curry countered with a 3-pointer, then Thompson knocked down two straight treys to tie the game at 93-93.

The game remained tied before Harris made an acrobatic layup out of the timeout to give the Magic the lead at 97-95 prior to a missed alley-oop attempt by Andrew Bogut.

The Magic overcame a 12-point third quarter deficit by limiting the hot- shooting Warriors to 6-of-23 shooting in the period. Harris' three-point play capped an 18-4 run that gave Orlando a 71-69 lead with 1:57 left in the quarter. O'Quinn's free throws to close the third gave the Magic a 75-73 lead.

Orlando led 25-24 after 12 minutes, then Golden State converted 15-of-19 shots in the second quarter to grab a 56-46 lead at the break.

Game Notes

The Magic had a season-high 11 steals ... Bogut had a season-high five blocks to go along with his 12 rebounds ... Green had 11 points, seven rebounds and six assists ... Golden State had a 49-40 edge on the boards ... The Magic scored 18 points off 15 turnovers.