Landry Shamet delivered a season-best 29 points to lead the New York Knicks past the Brooklyn Nets 113-105 on Sunday at Barclays Center.

The Knicks rested most of their regulars, including Jalen Brunson, Karl-Anthony Towns, OG Anunoby, and Josh Hart, ahead of their first-round playoff matchup against the Detroit Pistons.

Mikal Bridges was the only regular starter to appear, entering the game to preserve his consecutive games streak at 556 before checking out six seconds later after committing a foul.

Shamet, who replaced Bridges immediately after the foul, hit 7-of-13 from deep and went 9-of-17 overall in 40 minutes off the bench.

New York also received 21 points and seven assists from Cam Payne, while Precious Achiuwa chipped in with 18 points and nine rebounds.

The Knicks jumped out to a 38-37 first-quarter lead and maintained control throughout, outscoring Brooklyn 27-17 in the third to create separation.

Miles McBride added 17 points and eight assists in the victory, as New York completed a season sweep of its cross-town rival for the second straight year.

Trendon Watford and Tyrese Martin each scored 20 points for the Nets, who were without key contributors like Cam Thomas, D’Angelo Russell, and Cameron Johnson.

Brooklyn, already out of playoff contention, leaned on its younger core to close out a 26-56 campaign.

Jalen Wilson added 18 points, while Keon Johnson tallied 14 points and nine boards.

The Knicks shot 43 percent from the field and 38.1 percent from three, while converting 23-of-26 free throws.

Brooklyn hit 51.4 percent of its field goals but committed 18 turnovers, leading to 22 points for New York.

New York ends the regular season at 51-31, securing the third seed in the Eastern Conference.

They will open the playoffs next weekend against the sixth-seeded Pistons, who lost their final two games of the year.

The Nets conclude their season on a three-game losing streak, finishing 13th in the East.