Nelson redeemed himself after missing two free throws with 19 seconds to go and Orlando up one. Brook Lopez then made two foul shots to give New Jersey the lead with 11.5 seconds remaining, but Nelson sped down court and tossed in a floater while falling to his left.

Dwight Howard had 16 points and 10 rebounds for the Magic, who had dropped two straight at home, blowing an 18-point lead against Utah and falling 110-106 to lowly Toronto on Friday.

Devin Harris had 26 points, eight assists and six rebounds, but missed a pair of free throws with 2:03 left that would have tied it and had a layup spin out with the Nets down four shortly after.

Reserve Brandon Bass scored 14 points, while Nelson and former Nets guard Vince Carter each had 13 as Orlando won despite shooting just 42 percent.

Carter drove into the lane and slammed down a powerful dunk with 2:29 left to snap an 83-all tie, and he got to the basket again for a spinning layup and a four-point lead with 1:47 to go. Howard followed with two free throws for an 89-83 lead before New Jersey made one last push.

Travis Outlaw made a jumper and after Carter missed on a drive, Jordan Farmer made a 3-pointer to cut it to 89-88 with 20 seconds to play, setting up the finish.

Howard had averaged 21.4 points and 15.1 rebounds against Lopez, who managed only 11.9 and 7.4. The last matchup was particularly one-sided, with Howard getting 30 points and 16 boards in a Nov. 5 victory, when Lopez missed his first 13 shots and finished with 10 points on 3-of-17 shooting.

This one was more even, but the Magic had more balance against a Nets team that put only three players in double figures.

Harris had a second straight strong game for the Nets despite having to return to the locker room late in the first half for IV fluids after a cramp and missing the start of the third quarter.

Howard hit 4 of 5 shots and the Magic made 62 percent in the first quarter, but led only 31-25 because Lopez scored 12 and hit 5 of 7.

Orlando extended the lead to 12 in the second but gave almost all of it back with poor shooting and worse defending. The Magic made only 33 percent in the period and allowed the Nets to shoot 61 percent, with Jordan Farmar’s 3-ppointer cutting it to 52-51 at halftime.

Outlaw hit two 3-pointers in the final 23 seconds of the third quarter, including one with 0.7 seconds left that sent the Nets to the final period with a 69-68 lead.