Knicks forward Julius Randle puts up a shot against the...

Knicks forward Julius Randle puts up a shot against the Kings in the first half of an NBA game at Madison Square Garden on Sunday. Credit: Kathleen Malone-Van Dyke

In the course of 27 minutes on the floor on Sunday night, the Knicks saw every phase of what Julius Randle can be.

There was the unstoppable scoring force, as he piled up 27 points in the first half.

There was the unselfish playmaker in the third quarter, as the Kings double-teamed him and he responded by picking out open cutters, orchestrating the offense despite going scoreless.

And then there was the frustrating — and clearly frustrated — version.

Already playing without his backup, injured Obi Toppin, the Knicks had to play the last 15:35 without the ejected Randle, left to mix and match to find their way to the finish line. To add to the challenge, with just over nine minutes remaining, Jalen Brunson limped to the locker room, done for the night.

But with a cushion built and RJ Barrett picking up the offensive load, the Knicks held on for their fourth straight win, beating the Kings, 112-99, at the Garden.

Randle put a sour finish on what had been a spectacular performance. He threw up an air ball from three-point range and worked referee Marc Davis all the way down the court before grabbing an offensive rebound on the next possession. With contact in the lane, he went to the floor and was left there as the teams headed the other way with no call.

Randle got up and immediately went at the nearest official, Robert Hussey, who hit him with a technical. He turned and went hunting for Davis, arguing his case loudly as teammates tried to pull him away. But Davis handed him a second technical and an ejection with 3:35 left in the third quarter.

“We’ve got to go grab him,” Barrett said. “I would have grabbed him if I was in there. We’ve got to grab him, can’t let him get another one. That’s just a general thing for anybody. Once someone gets one, you’ve got to hold him back after that.”

“It’s an emotional game,” coach Tom Thibodeau said. “When he got the first tech, we have to do a better job of helping him walk away. As a team, staff, all of us, the way it was going.

“And I get the frustration. It was a physical game. And he got hammered on the play. But he can’t let that — he had a great game going — we can’t let it get us sidetracked.

“There are going to be some miscalls. That’s part of it. Just keep competing. But when a guy gets frustrated, we got to make sure to help. Just an awareness. Go grab him. It’s a dead ball. Just make sure everyone knows. You can’t get it back. But he’ll learn from it.”

More troublesome to the Knicks (14-13) moving forward, with 9:03 remaining and their lead at 17 points, Brunson was defending a drive by Davion Mitchell, who came down on Brunson’s right leg. He immediately grabbed at his right foot and ankle and remained down as play headed the other way before the Knicks spotted him and called time. He was helped to his feet, limped to the locker room and did not return with a sprained right ankle. Thibodeau said the team won’t have an update until Monday.

Randle and Barrett had 27 points each, with Barrett adding nine rebounds and six assists. Brunson finished with 18 points.

“It’s big,” Quentin Grimes said. “It just shows next man up coming in. It shows a lot of trust Thibs has in us, to all the young guys in there to close the game. A lot of energy here, a lot of laughing. It’s good right now for sure.”

The Kings (14-11) were led by Domantas Sabonis with 20 points and 12 rebounds.

Randle had 15 points in the first quarter and 27 by halftime, shooting 9-for-16 from the field and 6-for-6 from the free-throw line as the game turned into a constant heat check for him. Whether he was sizing up Kings rookie Keegan Murray for a three-pointer or soaring for a jam off a lob from Grimes, he was doing it all with a smile.

Randle has scored 94 points in the last three games and 190 in the last seven. “He’s going crazy,” Barrett said. “I don’t know. He’s hooping. And so I just hope he can keep it up.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME