E.J. Liddell scored a career-high 21 points and the Brooklyn Nets beat the Milwaukee Bucks 96-90 on Tuesday night at Barclays Center. Brooklyn won its second straight and improved to 20-59, while Milwaukee fell to 31-48.

Liddell set the tone early and never let Brooklyn lose control of the game. He had 17 points in the first half, giving the Nets the only reliable scoring punch they needed while the rest of the lineup settled in.

Ben Saraf added 19 points and delivered the key fourth-quarter push. His one-legged fadeaway and breakaway dunk helped Brooklyn stretch the lead to 83-72 in the opening minutes of the final period.

Milwaukee kept fighting and briefly made it close late. Taurean Prince hit a corner 3 with 2:28 left to cut the deficit to 88-87, but the Bucks could not get over the hump from there.

AJ Green led Milwaukee with 20 points, while Prince finished with 16. Cormac Ryan added 14 and Jericho Sims scored 12, but the Bucks could not find enough efficient offense to close the gap.

Brooklyn’s balanced attack mattered in the decisive stretch. Drake Powell scored 11, Malachi Smith also had 11, and the Nets used timely shot-making to hold off every Milwaukee run.

For Milwaukee, the loss added to a difficult finish. The Bucks were already eliminated from the postseason race, and pregame comments from Doc Rivers suggested uncertainty around his future only sharpened the focus on the team’s late-season struggles.

Brooklyn, meanwhile, has found some rhythm at the right time. The Nets have now won three of their last five, and Tuesday’s result gave them another confidence-building performance from a young roster trying to finish the season with momentum.

Statistically, the Nets were cleaner when it mattered. Brooklyn shot 44% from the field and made 21 of 23 free throws, while Milwaukee finished at 43% and went 5-for-8 at the line.

The Bucks will visit Detroit on Wednesday, while the Nets close the home portion of their season against Indiana on Thursday.