Joel Embiid #21 of the Philadelphia 76ers blocks a shot...

Joel Embiid #21 of the Philadelphia 76ers blocks a shot in the first half against Allonzo Trier #14 of the New York Knicks at Madison Square Garden on Sunday, Jan. 13, 2019 in New York City. Credit: Jim McIsaac

Kevin Knox is looking more and more like the real deal.

The Knicks may be piling up the losses, but their rookie forward gave them something to cheer about Sunday when he scored 31 points in a 108-105 loss to the Philadelphia 76ers at Madison Square Garden.

Knox became the sixth-youngest player in NBA history to score at least 30 points in a game, according to The other five? Kobe Bryant, Devin Booker, Kevin Durant, Jaren Jackson Jr. and LeBron James.

That’s a pretty heady group to be mentioned in, but Knox, who turned 19 in August, said it would have been even better if the Knicks had beaten the talented 76ers.

“It feels pretty good,” said Knox, who also had seven rebounds in 44 minutes. “I know it’s my career high. But I have a lot of room to improve. I’m only 19, so I want to keep getting better and keep learning every single year.”

Knox, who was taken with the ninth overall pick in the 2018 draft, was heralded as the next big thing after performing well for the Knicks in summer league play. He got off to a slow start in the regular season because of some injuries and it has taken him a while to get his conditioning up to NBA level.

That’s why his performance Sunday was so inspiring for Knicks fans. He not only hit 12 of 23 shots but was more productive as the game wore on, scoring 18 points in the second half.

“We’ve been trying to build his tank up to be this guy that can play big minutes and really perform throughout the game,” coach David Fizdale said. “I thought tonight was the first time in the second half that he didn’t fade when he started off with a double-figure first half. That’s a big step for him as a scorer and understanding how to carry that load.”

The Knicks cut a 24-point second-quarter deficit to one late in the third quarter and a 12-point fourth-quarter deficit to two with less than three minutes left.

After the 76ers went ahead by eight with 20.5 seconds left, Damyean Dotson was fouled by Joel Embiid on a three-pointer with 4.7 seconds remaining. He hit the first two free throws to make the score 108-105 and deliberately missed the third to the right. Emmanuel Mudiay (19 points) got the rebound and fired up a three-pointer over Embiid that appeared to have a chance, but it was just short, hitting the rim.

The 76ers (28-16) were led by Embiid’s 26 points and eight rebounds. JJ Redick scored 22 points and Ben Simmons added 20 points, 22 rebounds and nine assists.

The Knicks (10-33) have lost 17 of their last 19 but had to be encouraged by the way their young players performed against an elite team, especially without Tim Hardaway Jr. and Enes Kanter.

Luke Kornet provided 23 points, five assists and tough defense in 34 minutes off the bench. Kornet, who broke his nose on Embiid’s head in their last meeting, managed to get under his skin in this one. Embiid shot only 9-for-24 and raged at the officials on several occasions in the fourth quarter.

“I think any time you are with him, it’s going to be pretty physical,” Kornet said. “He’s a strong guy and he’s always looking to duck in. You just have to be able to match it.”

For now, the Knicks are not able to match many teams. But as they head to London this week for their game against the Wizards, their fans might see some promise down the road.