SACRAMENTO, Calif. — Buddy Hield scored 28 points and Harrison Barnes had 22 points and 10 rebounds in his best game with Sacramento as the Kings beat the woeful New York Knicks 115-108 on Monday night.

Harry Giles added 17 points for the Kings before getting ejected. Hield had seven assists and six rebounds to help them end a three-game losing streak. Sacramento remained three games behind San Antonio for the final playoff spot in the Western Conference.

Barnes' scoring output was his highest in eight games since being acquired from Dallas at the trade deadline.

Alonzo Trier scored 29 points in 30 minutes off the bench for New York (13-51), which has the worst record in the NBA and was mathematically eliminated from post-season contention with 18 games remaining. Dennis Smith Jr. added 18 points but the Knicks have lost 22 of 25.

Sacramento led by 14 midway through the fourth quarter before New York surged behind Trier and pulled to 100-92 with 6 1/2 minutes left. Hield dunked off an offensive rebound, then made a 3-pointer after Luke Kornet hit a free throw for the Knicks.

Kornet drained a 3 but Willie Cauley-Stein scored on an alley-oop dunk and made three free throws after New York intentionally fouled him twice.

There was an added security presence around Golden1 Center before the game due to protesters who were marching in city streets, two days after a Sacramento district attorney declined to bring chargers against two officers involved in the fatal shooting of Stephon Clark in March 2017. Clark, a 22-year-old unarmed black man, was shot after a chase that ended in his grandparents' backyard.

Perimeter barriers were set up around the arena and an adjacent plaza was closed, with only ticketed fans and people with credentials being allowed inside. No incidents were reported near the venue.

That was in contrast to last year when hundreds of people locked arms surrounding the arena, preventing fans from entering two games in protest of the police shooting.

TIP-INS

Knicks: Reached double figures in 3-pointers (12) for the 35th time this season. . Lance Thomas had five points in 16 minutes, one night after going scoreless for the first time since Dec. 17.

Kings: Giles was ejected with 5:07 left after being called for a Flagrant 2 penalty when he appeared to elbow Kornet in the head. Giles waved his arms while exiting to a loud ovation. . The Kings made 26 of 33 free throws.

UP NEXT

Knicks: Play at Phoenix on Wednesday. New York fell just behind the Suns (14-51) for the worst record in the league when Phoenix stunned the NBA-best Milwaukee Bucks on Monday night.

Kings: Host the Boston Celtics on Wednesday.

___

More AP NBA:https://apnews.com/tag/NBA andhttps://twitter.com/AP_Sports