So maybe it was a bit of a cheap shot by Carmelo Anthony when he smacked Sixers center Spencer Hawes in the back of the head after the two tussled for position on a missed shot by Nick Young.

Anthony was eventually issued a flagrant foul for his retaliation for what he said was an elbow to his throat.

“I didn’t mean to hit him in the head,” Anthony said. “It was just one of them plays. I wasn’t mad. I was just reacting to the elbow I caught.”

Nonetheless, you had to like the quick response by Knicks center Tyson Chandler, who forcefully pushed Hawes back with two hands after it looked like the burly 7-footer was about to go after Anthony.

“It felt like a punch,” Hawes said. “That’s why I was so [mad].”

Thanks to Chandler, Hawes never got near Anthony as both players were swarmed by teammates and officials. Technical fouls were issued and play resumed without further incident.

Anthony losing his cool again after coach Mike Woodson lectured his team about its constant loss of composure is a bit troublesome. But Chandler’s reaction displayed the kind of grit and fight you want to see from the Knicks, the kind of fight they ultimately used to hold off the Sixers 99-93 last night at the Garden.

The win not only snapped a four-game losing streak, but restored a sense of much-needed swagger or as much swagger as you can gleam from beating a team that had its own losing streak extended to five games.

“I was just protecting my teammates,” Chandler said after the Knicks won their first home game since Feb. 4.

Chandler’s quick defense of Anthony with 7:29 left in the third quarter didn’t turn his team into a juggernaut. In fact, the Knicks had to battle to hold off the Sixers, who closed to within five points in the final minute of a game that felt like it should have been a blowout. But beggars can’t be choosers.

“Four losses will wake you up,” Chandler said. “We had to stop the bleeding.”