The fans started heading for the exits with about a minute remaining, but they could have left earlier. The Knicks’ overall performance Tuesday night made a 10-point fourth-quarter deficit look insurmountable.

The ones who stuck around booed as the final seconds wound down on a 97-89 loss to the Celtics at Madison Square Garden. The Knicks’ sixth defeat in seven games dropped them five games under .500 for the first time this season.

“There is a little sense of urgency to know that we got to turn this thing around quickly because it can start going downhill, and we don’t want that,” Carmelo Anthony said.

The Knicks (23-28) weren’t as active or as effective defensively as Boston, and they couldn’t shoot straight. They hit just 31 of 82 field-goal tries (37.8 percent). Their only starter to shoot 50 percent was Robin Lopez (6-for-12). The other four were 15-for-47.

“We couldn’t find a combination of guys that could sustain on both ends,” Derek Fisher said. “We kept searching for how to get some guys in there that could cover us defensively as well as give us some balance offensively.”

Anthony shot 4-for-16 and fouled out with 16 points, none in the fourth quarter. Porzingis was 4-for-11 with 10 points. The rookie struggled to find any rhythm and looked flat-footed on defense for the second straight game. He sat on the bench for more than seven minutes of the fourth.

“Personally, it was a very bad game for myself,” Anthony said. “When I’m not at my best, playing my best out there, I think it affects the team and it showed.”

Porzingis said, “I had a bad night. Missing a couple of shots at the beginning and just couldn’t find my rhythm early and that obviously didn’t help us at all. I wasn’t playing well.”

Arron Afflalo scored 18 points, but just seven after the first quarter. He also committed four turnovers, three in a 24-second stretch in the third. Lopez scored 17 and grabbed 13 rebounds, 11 of them offensive. Langston Galloway, who started at point guard with Jose Calderon (groin) missing his fourth straight game, was 0-for-4 with one point.

Knicks videos

“There aren’t any excuses or explanations other than just not getting the job done in terms of being able to go out and bring the game to our opponent,” Fisher said. “Right now teams have more guys that are able to come in there and impact the game.”

Before the game, Fisher said there’s been “slippage” in the Knicks’ focus lately as talk about them being good enough to make the playoffs has grown louder. Games like this will quiet that noise.

The Knicks fell behind 81-70 with 9:07 left after an Olynyk three-pointer. But back-to-back baskets by Derrick Williams and an Afflalo three made it 81-77 with 7:37 left. The Knicks stumbled from there. They didn’t make a field goal for the next 4:24 and couldn’t stop Boston. Turner and Olynyk got open shots, and Zeller was cleaning up misses.

The Celtics were up 93-83 when the Knicks finally ended their field-goal drought with a Porzingis runner with 3:13 left. The Knicks never got it under eight the rest of the way.

“Regardless of who’s playing, we’ve got to find a way to be able to come out there and perform and be ready to go and do the job for our team,” Fisher said. “They were just better at getting the job done than we were.”

Subscribe to Newsday’s sports newsletter

Receive stories, photos and videos about your favorite New York teams plus national sports news and events.