ORLANDO, Fla. -- The Brooklyn Nets had to work hard to get back to .500.
Brooklyn was outscored 37-14 in the fourth quarter and nearly squandered a 26-point second-half lead. Brook Lopez and Deron Williams scored 16 apiece as the Nets returned to .500 for the first time since they were 4-4 on Nov. 13.
"First three quarters were great for us," Williams said. "We played well on both ends of the floor. We created a lot of easy opportunities, especially on offense. Defense was great. When you're down, you're kind of playing carefree. We looked like we were playing just to hang on instead of going ahead and closing out the game."
The Magic (13-23) struggled shooting the ball most of the night, but played well down stretch. They got within two with 3.8 seconds to play on a 3-pointer by Elfrid Payton.
But they weren't able to foul again as Brooklyn successfully ran out the clock.
Brooklyn had 22 turnovers, but outscored the Magic 50-42 in the paint.
"They just kept attacking us," Nets coach Lionel Hollins said. "A couple of their guys got hot and started hitting 3s. ... But that's basketball, that's competition. I thought our guys showed a lot of poise at the end."
Victor Oladipo led seven Orlando players in double figures with 17 points. Payton had 16 points, 10 assists and nine rebounds.
The Magic lost their second straight game, and have dropped nine of their last 11 at home.
Payton connected on 1 of 2 free throws with just over a minute to play to help the Magic close to 98-95.
That was still the score when teammate Ben Gordon missed a jumper from the corner, leading to a scrum near the sideline.
The Magic eventually ended up with possession after a replay review. But Orlando failed to capitalize on the opportunity, with Evan Fournier missing a 3-pointer from the top of the key, giving the ball back to Brooklyn with 22.6 remaining.
Joe Johnson was then fouled and hit a pair of free throws to stretch the lead back to five.
"Maybe if we had a couple of more minutes, the game would have (gone) differently," said Gordon, who had 13 of his 14 points in the fourth quarter. "We can't dig a hole for ourselves like that."
Except for some early turnovers, the combination had another successful night. Brooklyn was mostly able to do what it wanted on the offensive end, hovering above 60 percent shooting for most of the game.
Nets: Brooklyn improved to 6-1 with Jack starting at point guard. ... Brooklyn shot 60 percent in the first half, but committed 10 turnovers that led to 10 Magic points.
Magic: Orlando dropped to 3-13 when its opponent scores 100 or more points. ... It was the first part of the Magic's 10th back-to-back games of 2014-15. They have a total of 17 back-to-backs this season. ... Rookie F Devyn Marble was activated and played 20 1/2 minutes after a three-game assignment with the Erie BayHawks, Orlando's NBA Developmental League affiliate.
OFF THE BENCH
Williams scored in double figures for the first time since Dec. 17, just a few games before Hollins shuffled the lineup. He was productive throughout the night, shooting 5 for 10 from the field and handing out a team-high seven assists.
Nets: Conclude a three-game road trip at Miami on Sunday.
Magic: Host the Hornets on Saturday night to wrap up a three-game homestand.
Jokic scores 34 points, Nuggets beat Pistons 117-111
Luka Doncic goes off for 37 points to lead Mavs past Grizzlies
Luka Doncic tallies 37 points, 11 rebounds and 9 assists as the Mavericks defeat Ja Morant and the Grizzlies.
Edwards, Russell team up to lead Wolves past Nets, 136-125
— Anthony Edwards scored 25 points, D’Angelo Russell had 23 points and 10 assists, and the Minnesota Timberwolves defeated the Brooklyn Nets 136-125 on Sunday night.