NEW YORK -- Brook Lopez smiled through a tribute video that showed his highlights stretching back to when he played in New Jersey in red, white and blue uniforms.
Then he went out and added a few more -- this time at the Nets' expense.
Lopez scored 19 points in his return to Brooklyn, making the Lakers' final basket with 1:28 left to help Los Angeles hold on for a 102-99 victory on Friday night.
The Nets' career leader in scoring and blocked shots also had a big block down the stretch as the Lakers did just enough to avoid a third straight loss.
"Brook was great tonight," Lakers coach Luke Walton said. "He did a good job. We don't win that game without him obviously."
Julius Randle had 19 points and 12 rebounds, and Brandon Ingram added 16 points, 10 assists and eight rebounds for the Lakers. Josh Hart finished with 15 points and 14 rebounds, helping Los Angeles to a 56-38 advantage on the boards.
Spencer Dinwiddie had 23 points, nine assists and seven rebounds for the Nets. Rookie Jarrett Allen, playing the center spot Lopez occupied for nine seasons in New Jersey and later Brooklyn before getting dealt to Los Angeles in the trade that brought D'Angelo Russell to Brooklyn, had a season-best 20 points.
"He was the face of the franchise here and now I am here trying to become the face, too," Allen said of facing Lopez. "Just going back and forth. I mean, it's a good challenge."
Lopez came out on the winning end of it, blocking Allen's shot with 1:41 left to preserve a two-point lead, then scoring on a short running hook.
The No. 10 pick in the 2008 draft by the Nets, Lopez has had to navigate a new role in Los Angeles, where the Lakers like to play small and fast. But they needed his big presence in a low-scoring fourth quarter.
"It's just been different all season but I just try to stay ready," Lopez said.
Allen was 6 for 6 for 16 points in the first half, but Lopez answered with 12 points in the third quarter, going 5 for 5 from the field with a pair of 3-pointers to send the teams to the fourth tied at 85.
The Lakers shut the Nets out for more than five minutes while scoring 11 straight to open a 96-87 lead.
Lakers: The Nets played a video tribute for Lopez between the first and second quarters that included him dunking over his twin brother, Robin. "I definitely caught that," Lopez said. "They could have like three or four more of those obviously, it happened so often." ... Kyle Kuzma was drafted with the No. 27 pick, which the Lakers acquired from the Nets in the Lopez-Russell trade. ... The Lakers attended the musical "Hamilton" on Broadway on Thursday night.
Nets: James Webb III made a 3-pointer in the first half for his first NBA points. The Nets said he was the first Boise State alum to score in the NBA since Coby Karl in 2007-08. ... Russell finished with 15 points off the bench.
DUNKING LIKE DAD
With Larry Nance Jr. chosen Thursday for the Slam Dunk Contest during All-Star weekend, he'll have a chance to follow in his father's footsteps -- or flight path. Larry Nance was an NBA high flyer who won the inaugural event in 1984 in Phoenix.
"His dad was obviously one of the all-time best and now he's got a chance to go and show what he can do," Walton said.
Walton also followed his father, Hall of Famer Bill Walton, to the NBA.
"Larry's obviously living his own career, he's doing his own thing, but there's something special when you get to do what your father did," Walton added.
Jeremy Lin has been rehabbing in Vancouver after rupturing his right patellar tendon in the Nets' season opener. He declined to offer much specific about his treatment, but is working to not only heal the knee but also build up other parts of his body so he can come back quicker and stronger.
"To have a year off is really, how can I best maximize this time and also to put myself in a position where I'm not in this position again," Lin said. "I mean this is sports so nothing's guaranteed, but just addressing a lot of muscle and balances, movement, deficiencies, all these different things."
Lakers: Visit Oklahoma City on Sunday.
Nets: Host Milwaukee on Sunday.
More AP basketball: https://apnews.com/tag/NBAbasketball
Heat roll out their 'earned' jersey: 'Sunset Vice' in laser fuschia
NBA and Nike are rolling out the "Earned" collection, giving the 16 teams that made the playoffs last year a chance to show off bonus uniforms. The Miami Heat unveiled theirs, called "Sunset Vice."
Best bets for Wednesday's NBA games
With 11 NBA games tonight, there are plenty of betting opportunities available. Our experts give their best bets for Wednesday's slate.
How the Heat made the coolest jerseys in the NBA
Miami's new pink "Vice" jerseys take alternate uniforms to an exciting new level.