ORLANDO, Fla. -- D'Angelo Russell matched his career high with 40 points and the Brooklyn Nets came back from a 21-point deficit to beat the Orlando Magic 117-115 on Friday night.
Russell's 3-pointer with 27.1 seconds left put the Nets up for the first time since they went ahead 2-0 in the game's first minute. After missed free throws by both teams left Brooklyn with a two-point lead, Evan Fournier missed a shot in the lane that would have tied it for Orlando.
It was the 16th win in 21 games for the Nets, who made 19 of 46 3-point shots.
Aaron Gordon scored 23 points for Orlando, which has lost six of eight. Nikola Vucevic added 16 points and 17 rebounds for the Magic, who shot 50 percent but made only 10 3-pointers.
Spencer Dinwiddie scored 18 of his 20 points in the second half for Brooklyn.
The Magic made 11 of their first 15 shots in the second quarter to take a 58-37 lead. Russell made five 3-pointers in a span of less than four minutes to shoot the Nets back in the game.
Dinwiddie and Shabazz Napier sparked a second-half rally after the Nets had fallen behind 86-68 midway through the third quarter.
Nets: At 24-23, the Nets are above .500 after 47 games for the first time since 2012-13. ... The Nets have won six straight games by three points or less. ... Russell scored the Nets' final 19 points of the first half. ... Nets coach Kenny Atkinson called a timeout 81 seconds into the game after two Orlando dunks.
Magic: Rookie C Mo Bamba had nine points and four rebounds after missing four games with a sore left foot. ... Vucevic's 10th rebound gave him 5,000 for his career. ... The Magic distributed 13 grants worth a total of $1.2 million to 16 organizations in a pregame ceremony.
Nets: At home against Sacramento on Monday afternoon.
Magic: At home against Milwaukee on Saturday night.
More AP NBA: https://apnews.com/NBA and https://twitter.com/AP—Sports