Kyrie Irving of the Nets reacts in the second half against...

Kyrie Irving of the Nets reacts in the second half against the Knicks at Barclays Center on Saturday. Credit: Jim McIsaac

If the Knicks entered Barclays Center on Saturday with clearly-laid-out expectations — a playoff berth, as voiced by Madison Square Garden chairman James Dolan — they failed the first test.

The Knicks went into the game against the Nets with consecutive wins over Cleveland and Boston and, after Dolan expressed his optimism in a radio interview, they had an opportunity on national television to show where they are.

With Kyrie Irving scoring 21 of his 32 points in the fourth quarter, the answer is “not ready for prime time’’ as the Knicks fell to the Nets, 122-115.

With no Kevin Durant, it was Irving who dominated to hold off a furious Knicks comeback that reduced a 19-point third-quarter deficit to three with 3:07 remaining. And when it was over, the Knicks had no answers for what else they could have done.

“I don’t really know what you’re supposed to do,” RJ Barrett said. “I mean, Quentin [Grimes] was playing great defense. It’s Kyrie Irving, man. He’s gonna make those shots. We had to try to get the ball out of his hands as much as we can, but it wasn’t like he was getting easy layups or anything. He really made some tough shots. So tip your hat off to him.”

“We tried different things,” Julius Randle said. “We tried to get the ball out of his hands. He made tough shots and he made the right plays.”

After shooting 4-for-12 and scoring 11 points through the first three quarters, Irving missed his first two shots in the fourth quarter but then went 8-for-13.

The Nets have presented a measuring stick for the Knicks and they have regularly come up short, having lost nine straight games against their crosstown rivals. They could have moved within two games of the fourth-place Nets (30-19) but instead fell four games back.

“For me,” Irving said, “I love beating the Knicks and playing against them.”

Jalen Brunson scored 26 points, Barrett had 24 and Randle contributed 19 points, 10 rebounds and eight assists for the Knicks (27-24).

The Knicks trailed 93-86 when Irving began to heat up — connecting on a three-pointer when Deuce McBride wandered off him to help in the lane, then scoring in the paint and following Seth Curry’s three-pointer with one of his own. That put the Nets up 104-90 with 7:25 left, and Tom Thibodeau signaled for a timeout to get his starters back on the floor.

“We were running guys at him, too,” Thibodeau said. “It’s who he is. He’s not going to stop moving, either. We got the ball out of his hands. Chased it down. Came back. He made some tough plays. Those were deep threes that he made on us.”

The Knicks closed it to eight again and had the ball, but Brunson lost the handle and Irving picked up the loose ball and went the distance, beating two defenders for a fast-break layup. But when Randle connected on a jumper in the lane with 4:29 left, the Nets called time clinging to a 106-100 lead.

Immanuel Quickley (16 points) hit a corner three-pointer with 3:36 left, and after Jericho Sims blocked Curry’s layup, Grimes followed Quickley’s miss to make it 108-105 with 3:07 left.

Curry’s three-pointer pushed the lead back to six, but Brunson delivered in the lane. The Knicks got a stop, but Grimes misfired on a step-back three with 1:45 to play — and this time Irving delivered a dagger, draining a three-pointer with 1:19 to play for a 114-107 lead.

The Knicks fell behind by as many as 18 points in the second quarter, and the frustration showed as Thibodeau and Randle each was hit with a technical foul as Barrett prepared to take a free throw in the final minute of the half. As the half ended, Brunson guided Randle off the court and to the locker room to prevent him from getting whistled for a second technical and an ejection.

That the Knicks trailed by only 62-49 at halftime seemed like a minor victory as they hardly resembled the team that had beaten Cleveland and Boston in their last two outings.

Nic Claxton blocked three shots in the half, and the best thing the Knicks had going for them was Randle drawing double teams and finding open shooters. He tallied six assists in the half to go along with 11 points and five rebounds.

DON'T MISS THIS LIMITED-TIME OFFER1 5 months for only $1Save on Unlimited Digital Access