SACRAMENTO, Calif. — Skal Labissiere was rejoicing in his tiebreaking 3-pointer with 1.6 seconds left when Kings teammate Zach Randolph sprinted onto the court from the bench and picked up a technical foul.

It seemed costly at the time. Still, all Labissiere could do was laugh.

"I told him he's too old to be doing stuff like that, he's been in the league too long," Labissiere said after Sacramento held off the New York Knicks 102-99 on Sunday night despite blowing a 19-point lead in the final quarter.

"But it's all love. That's a brother of mine, and I appreciate that."

The Kings could afford to smile after a wild final 9 1/2 minutes. New York trailed 92-73 early in the fourth quarter and appeared headed for a lopsided defeat before rallying to tie it at 97-all on Michael Beasley's short turnaround jumper with 1:08 left.

Both teams traded empty possessions before Bogdan Bogdanovic made a 20-foot step-back shot to put the Kings up 99-97. Following a timeout, Kyle O'Quinn was fouled and sank both free throws for another tie.

Labissiere then got the ball outside the arc and twice thought about passing it before he threw up a desperation heave with time running out.

"It's one of the plays we run down the stretch," Labissiere said. "Usually the ball ends up with either (De'Aaron) Fox or (Bogdanovic). It just so happened that I had it, read the play and decided to take the shot."

As Sacramento's players celebrated, Randolph — who did not play — ran onto the court to join in and was called for a technical.

Courtney Lee missed the free throw, however, and Trey Burke's desperation 3 was also off.

"You have to take an advantage of your opportunities when you have it," Knicks coach Jeff Hornacek said. "That's how you're supposed to play all the time. You can't do it for just 12 minutes of the game. You have to do it for all 48 minutes."

Sacramento had scored only 14 points in the first 11 1/2 minutes of the fourth quarter.

Bogdanovic had 22 points and seven assists, Labissiere had 14 points and six rebounds, and three others scored 12 points apiece for the Kings.

It's Sacramento's second win in six games since the All-Star break and helped the Kings avoid being swept by the Knicks for a second consecutive year.

The victory was also the 199th of Kings coach Dave Joerger's career.

"I thought we did a good job of executing in special situations," Joerger said. "It was a good experience for the guys."

Tim Hardaway Jr. scored 24 points for New York. Enes Kanter had 14 points and 16 rebounds while O'Quinn had 14 points and eight rebounds.

The Knicks have lost four straight and 12 of 13.

IT COUNTED

Labissiere was 10 of 29 on 3-pointers before hitting the winner on his only attempt beyond the arc Sunday.

"That's a tough shot for anybody, the type of defence that was played on him," Fox said. "He deserved to knock it down."

KEEPING IT CLOSE

Sacramento has won only three games by 10 points or more this season.

TIP-INS

Knicks: New York missed its first nine shots beyond the arc. ... The Knicks made 10 of 13 free-throw attempts in the second quarter after not getting to the line at all in the first. ... New York lost in Sacramento for the first time since Dec. 10, 2015.

Kings: Sacramento's first five points came on second-chance opportunities. The Kings had four total against Utah a night earlier. ... Randolph was held out as part of Joerger's plan to rest his veterans on a rotating basis. ... Willie Cauley-Stein (lower back strain) missed his second consecutive game.

UP NEXT

Knicks: Play at Portland on Tuesday.

Kings: Host the New Orleans Pelicans on Wednesday.

___

More NBA basketball: https://apnews.com/tag/NBAbasketball