SACRAMENTO — The Knicks went to the locker room at halftime Monday night down by 15 points, having trailed by as many as 20. They were on the second night of a back-to-back and the fourth game of a seven-game road trip. Seemed like a night to throw in the towel.

But if any team knows a double-digit lead is no sure thing, it is the Knicks. Flying out of the locker room with a 44-point third quarter and an 83-point second half, the Knicks beat the Sacramento Kings, 131-115, at Golden 1 Center in a game that featured a 43-point swing.

Julius Randle had a career-high 46 points, 33 in the second half, when he shot 12-for-17 overall and 7-for-11 from three-point range. Randle hit a career-high eight shots from behind the arc and added 10 rebounds.

"When he’s doing that, shoot, anybody is doing that, give him the ball, get out of the way, let him do what he does,’’ RJ Barrett said. "Even if you’re playing well. We were all playing well, but man, when he was doing that, nah, you get out of the way.''

Randle, Barrett (29) and Immanuel Quickley (27) totaled 102 points.

It was the most points in a half by the Knicks since Nov. 18, 1988 (84 vs. the 76ers) and the most in a second half since Dec. 28, 1969 (83 vs. the Suns).

After losing 17 of 20 games, the Knicks (27-38) have won two straight for the first time since Jan. 12-15.

It hardly seemed like the sort of night for a comeback with the Knicks raggedly dragging through the first half and losing Mitchell Robinson 1:40 into the game when he was declared out with a non-COVID-19 illness.

Randle had 17 of his team’s 44 points in the third quarter as the Knicks erased what had been a 63-43 deficit. They took their biggest lead at 129-106, having outscored the Kings 86-43 in a span of 22:51.

"We were flat and we knew we had to get going,’’ coach Tom Thibodeau said. "He provided that energy. When he gets going like that, that lifts everyone. We were able to feed off of that. That was huge. You feel like you have a chance to win.’’

Randle had an odd first half. He took 14 shots in the first quarter and scored 13 of the Knicks' first 17 points but played only 57 seconds in the second quarter and failed to get a shot off. He picked up his third foul with 6:16 left in the quarter and sat out the rest of the period.

"On a back-to-back, I like to come out a little bit more aggressive just because I know typically you need energy on a second night of a back-to-back,'' he said. ''So just try to be aggressive and inspire the team that way.''

Randle’s three-pointer with 4:34 left in the third quarter gave the Knicks their first lead of the night at 81-80.

De’Aaron Fox had 24 points and Harrison Barnes 23 for the Kings (24-43). Domantas Sabonis added 19 points and 13 rebounds before picking up two technical fouls in the final minutes and getting ejected.

Cam Reddish went to the locker room in the opening minute of the fourth quarter as he tumbled hard to the floor after soaring over Davion Mitchell while trying to block a shot on a fast break. He was helped up and appeared to be favoring his right shoulder.