The Magic all but evened the playing field for the Nets, but even that wasn’t enough.

Despite playing without their starting point guard — Elfrid Payton missed his third straight game with an ankle bruise — and nursing a long losing streak of its own, the Magic managed to cobble together a fourth-quarter comeback, defeating the woe-begotten Nets, 83-77, at the Barclays Center.

The Magic outscored the Nets 23-15 in the fourth quarter and went ahead on Aaron Gordon’s layup with 6:21 to play. Victor Oladipo, at the point for Payton, hit a three-pointer half a minute later to fuel the rally.

The Nets (10-26), lost their third straight and ninth in a row at home. The Netwho trailed by 11 in the first quarter, led by five in the third quarter, but couldn’t sustain the momentum, They haven’t won since point guard Jarrett Jack tore his ACL and meniscus Saturday, requiring season-ending surgery.

Brook Lopez led the Nets with 17 points, Joe Johnson scored 13 and Shane Larkin added 12. Thaddeus Young, who picked up his fifth foul with a little more than nine minutes left, had 11 points and nine rebounds. The Magic’s Nikola Vucevic and Oladipo led all scorers with 20. Orlando’s Tobias Harris of Dix Hills was held to nine points but had 12 rebounds for the Magic.

Even though the Magic (20-17) was substantially better on paper, Friday night was essentially a matchup of two floundering teams, gasping for a break in a long stretch of ineffectiveness. The Magic came into the game losers of their last four, and with the Wizards up next and a trip to London to play the Raptors on the horizon, it needed to capitalize on the Nets’ weaknesses.

The Nets ended the first quarter trailing by nine, but clawed back with their reserves. A second-quarter lineup of Willie Reed, Thomas Robinson, Donald Sloan, Markel Brown and Bojan Bogdanovic got them to within five in the first two minutes of the second quarter. Robinson kicked it off at the end of the first quarter with a fadeaway jumper at the buzzer, and his dunk with 9:47 left in the first half drew the Nets to within 28-23.

Sloan’s trey from the top of the key, followed by Young’s dunk from Johnson in transition, tied it at 28. Johnson’s baseline three with 3:51 left in the half gave the Nets a 35-33 lead. The Nets went into the break up 38-37.

The Nets’ bench outscored Orlando’s 13-2 in the first half. Both teams shot poorly and the teams totaled 17 turnovers. The Nets had a five-point lead on Johnson’s basket with 7:20 left in the third quarter, but could never break away, despite help from Orlando’.

The Magic shot 39.8 percent from the floor and at times looked ill at ease without Payton running the show. Despite that, the Nets, who shot 39.7 percent overall , could never build a cushion, and Vucevic’s three-point play gave the Magic a 56-55 lead with 1:29 left in the third quarter. Wayne Ellington briefly gave the Nets life at the end of the quarter, hitting a buzzer-beating three-pointer that gave them a 62-60 lead going into the fourth.