Knicks forward Kristaps Porzingis looks on against the Nets during the...

Knicks forward Kristaps Porzingis looks on against the Nets during the third quarterat Barclays Center on Thursday, Dec. 14, 2017. Credit: Kathleen Malone-Van Dyke

Kristaps Porzingis felt his knee buckle and then felt a sharp pain. It was the sort of thing that would strike fear in most any basketball player, but he wasn’t too worried, he said afterward. He stayed in, got some treatment and tried to play through the pain.

That is, until it got to be too much.

“I felt my knee kind of buckle a little bit,” he said. “I felt a little pain. It’s more just being cautious. I had a sharp pain.”

Porzingis left in the third quarter of the Knicks’ 111-104 win over the Nets at Barclays Center on Thursday night.

He was seen clutching his leg, and though the Knicks have officially listed it as a sore left knee, it was clear after the game that no one quite knew the extent of the injury.

What was certain is that Porzingis could stand and walk without apparent trouble — and that the Knicks very much hope that when doctors examine him Friday, they’ll get good news.

“Hopefully this is just a little thing that happens,” Porzingis said, adding that he didn’t believe the injury to be serious.

“I felt the pain and I kept playing,’’ he said. “I kept playing and then I came out in the timeout and I felt something happen to my knee, so I asked for some help and I went back into the game. I kept playing but I just wasn’t feeling right. It was not stable.

“Maybe it was also mental — like you know something happened. I tried to play and I didn’t feel comfortable jumping up with the left leg.”

Porzingis had 13 points, four assists and two rebounds before his early exit. Neither he nor Jeff Hornacek would guess at what doctors will say, and Porzingis said he wasn’t sure he’ll be able to play in the Knicks’ next game on Saturday.

Porzingis’ injury had an immediate impact on the game. He walked off with 9:25 left in the third quarter, and the Nets, who had trailed by 18 in the second quarter, looked like a team reborn. Without Porzingis there to stop them, they went on a 20-8 run.

The Nets took their first lead of the game when Allen Crabbe stole the ball and dished it to Rondae Hollis-Jefferson, whose layup made it 73-72 with 5:44 left in the third quarter.

But the Knicks, led by an amped-up Courtney Lee (27 points) and Michael Beasley (15 points off the bench), came back and led 87-82 going into the fourth.

Spencer Dinwiddie led the Nets with 26 points and seven assists. Hollis-Jefferson added a career-high 25 points along with seven rebounds. He shot 10-for-16 from the field.

The Nets, who shot 44.6 percent from the field (37-for-83), were 12-for-42 from three-point range.

The Nets got to within three points with 5:22 left, but their frenetic pace — and lackluster ballhandling — bit them.

Two straight turnovers led to five straight points for the Knicks: Tyler Zeller lost it to Ron Baker, who fed Lee for a reverse layup, and then Caris LeVert lost the ball at midcourt to Baker again. Lee’s uncontested three-pointer put the Knicks up 100-92 with 4:20 left.

The Nets got to within 100-97 on DeMarre Carroll’s putback, but the Knicks created space again with Frank Ntilikina’s three-pointer.

“When KP went down, Mike [Beasley] really stepped up there and got us the buckets,” said Hornacek, whose team earned its second road win in 10 games this season — albeit a potentially Pyrrhic one. “It was a battle. Guys were flying around.”

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME