The Orlando Magic turned a close game into a rout by scoring nine consecutive points late in the second quarter Friday afternoon, and went on to beat the Brooklyn Nets 128-118 in the first game of the NBA’s restart for both teams near Orlando.

Evan Fournier had 24 points while Aaron Gordon posted a double-double (10 points, 11 rebounds) for the Magic (31-35), who moved past the Nets (30-35) into seventh place in the Eastern Conference. The top seven teams are guaranteed a playoff spot. The eighth-place team advances to the postseason as the final seed if it is at least four games better than the ninth-place team at the end of the regular season. Otherwise, a two-game series will be played to determine the eighth seed.

Starters Nikola Vucevic (22 points) and D.J. Augustin (11 points) got into double digits for the Magic, as did reserves Jonathan Isaac (16 points) and Khem Birch (12 points).

Timothe Luwawu-Cabarrot scored 24 points off the bench for the Nets, who remain six games ahead of the ninth-place Washington Wizards after the Wizards lost to Phoenix later in the day. Washington and Brooklyn face off on Sunday.

Caris LeVert had 17 points, Joe Harris and Jarrett Allen scored 14 points apiece, and Tyler Johnson added 11 points off the bench.

The Nets raced out to a 16-8 lead fewer than four minutes into the game. Orlando responded with its own 16-8 run during which Augustin and Vucevic scored five points apiece. A running layup by Markelle Fultz with 2:33 left in the quarter gave the Magic their first lead at 29-27.

The two teams were separated by no more than five points through the first nine minutes of the second quarter before the Magic’s surge. Five players scored a basket apiece during the run, including Fournier, whose 3-pointer put Orlando up 68-57.

LeVert made a buzzer-beating jumper to pull the Nets within 70-59 at halftime but Vucevic scored five points as the Magic opened the third quarter with a 10-2 run. A LeVert jumper brought the Nets within 86-70 with 7:31 left in the period, but Orlando went on a 21-7 run over the next five minutes to expand its lead to 107-77.

But the Magic went scoreless in the final 6:59 and Luwawu-Cabarrot scored eight points during a game-ending 18-0 run. Brooklyn had a chance to close within single digits but missed five straight 3-pointers in a 63-second span.