Knicks guard Josh Hart celebrates his three-point shot against the...

Knicks guard Josh Hart celebrates his three-point shot against the Boston Celtics with center Karl-Anthony Towns late in the fourth quarter at Madison Square Garden on Thursday. Credit: Brad Penner

It was a made-for-TV night, a game set up as a throwback to the Knicks’ upset playoff victory over the Celtics a year ago, a preview of what might occur if they meet again in the postseason, and a dramatic return by Jayson Tatum to Madison Square Garden, where his season ended with an Achilles tear 11 months ago.

But if you really wanted to feel the full weight of a revenge game and a postseason preview, what was missing was what has spoiled too many NBA games this season. One of the main protagonists, Jaylen Brown, was on the Celtics’ bench in street clothes.

The hard-fought 112-106 win over the Celtics means the Knicks (52-28) will head into the final two games of the season still alive to edge Boston (54-26) for the second seed in the Eastern Conference. They took the season series 3-1. They also own a one-game lead and a tiebreaker over the Cavaliers and have a magic number of one to clinch third.

“We’re heading in the direction of being where we need to be,” Mike Brown said. “I like the climb that we’ve made the last week or so, the last three or four games, and we’ve got a couple more games to get there.

“For us, we’ll take it one game at a time. We’ve got these two left. We’d like to win both of them. What does that mean? I don’t know. We’ll see at the end of the day. But when we lace them up, we’re playing to win.”

After spending much of the season talking about taking revenge after seeing last season’s title hopes derailed by the Knicks in the Eastern Conference semifinals, the Celtics’ Brown was ruled out Thursday afternoon with Achilles tendinitis.

He had played in the last five games after sitting out two games. This game, played before a national television audience with the Celtics owning a chance to clinch the second seed — and home-court advantage if they face the Knicks in the conference semifinals — seemed like a night to lace up and play.

After all, it marked Tatum’s return.

Revenge. Emotion. Rivalry. And then a thud.

But it’s hard to say nothing mattered here. The fans crowded the corridors of the Garden screaming a variety of pro-New York, anti-Boston chants. It didn’t seem to matter that this wasn’t a full squad and maybe won’t portend anything to come.

The Celtics, like the Knicks, were on the front end of a back-to-back set. Tatum is not playing in back-to-back games, still clearly not his All-NBA self yet — evidenced by his 7-for-22 shooting (2-for-10 from three-point range) for 24 points — and Brown also is avoiding the back-to-back stress on his body at this time of the season.

The game swung wildly, with the Knicks taking a 13-point lead early in the second half, only to see Boston move ahead by seven in the fourth quarter. Then came the sort of things the Knicks have been waiting for all season.

A two-man game between Jalen Brunson and Karl-Anthony Towns opened up all sorts of offensive possibilities, including baskets for each of them, and when Boston desperately tried to converge on them, Josh Hart delivered big shot after big shot, scoring 15 points in the fourth quarter. He shot 9-for-11 in the second half, including 5-for-5 from three-point range, and scored 23 of his 26 points.

Hart’s two biggest baskets came in the final 42 seconds. He hit a three-pointer with 42.9 seconds left to give the Knicks a 109-104 lead and sank another three with 15.2 seconds left to make it 112-106.

“I just think we’ve had convos in the days and those convos are showing up in the game, especially in the last two fourth quarters,” said Towns, who finished with 16 points, 12 rebounds and four assists. “In high-pressure situations, we’ve leaned on each other and trusted each other in those situations, and it’s been very good for our team.”

“Just trying to make the defense make decisions and just playing off of that,” said Brunson, who had 25 points and 10 assists, five of which came in the fourth quarter. “I think the longer we’ve been together, the better our chemistry has been ... It’s a very effective play.”

The Knicks approached this game with whatever fuel and fire they could.

“Two games left,” Hart said. “This is just another step in the right direction for the playoffs, gearing up for that. The thing to us is another step in the right direction of building those habits.”

“I think we are still getting better,” Brunson said. “We’re in a good place where we are doing some things very well, but also we have a lot to learn.”

While Tatum was taking in all of the moments back at the Garden, from the applause with which the Knicks fans greeted his introduction to standing on the court in the spot where he suffered the devastating injury, he might have had the best perspective on what all of this means.

“Today was just big, because it was my first time back,” Tatum said. “As far as the second round goes, we got to get through the first round and take care of business there and not look past anything.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME