NBA

Anthony, Amar’e spark needed Knicks’ win over 76ers

IT’S OVER: J.R. Smith, who scored 14 points, is all smiles during the Knicks’ win over the 76ers.

IT’S OVER: J.R. Smith, who scored 14 points, is all smiles during the Knicks’ win over the 76ers. (Paul J. Bereswill)

And you were worried about the Knicks.

There was nothing wrong with them that being at home against a team that entered with its own four-game losing streak, a record of nine games under .500 and a schedule that had them playing the tail end of a back-to-back wouldn’t cure.

So what if the Knicks led by 20, but saw Philadelphia get within five late? What difference does missing their last 10 shots make?

“I liked the way we played, though,” coach Mike Woodson said. “The bottom line was we had to win this tonight just to kind of get off this slide.”

And so they obliterated their season-high four-game losing streak by outlasting Philadelphia, 99-93, at Madison Square Garden. They did it with aggressive defense. They did it with Carmelo Anthony overcoming an Arctic shooting hand but still scoring 29 points, thanks to virtually paying rent at the foul line, where he made 16 of 18 free throws. They did it with Amar’e Stoudemire giving a superb 9-of-10 shooting, season-high 22-point burst of offensive energy off the bench.

“Sometimes, when you lose consecutive games, you start pressing and start over-thinking,” said Anthony (6 of 18 from the floor) who was called for a flagrant foul 1 in the third quarter when emotions boiled but did not explode. “We were much more aggressive on the defensive end. When you start off aggressive like that, it’s easier to pull back when we need to. Everybody fed off each other on the defensive end.”

And when they needed to be, they were pretty good on the offensive end, especially early and especially Stoudemire.

“After losing four straight, it’s never a good feeling so tonight we came out with the intensity from the start that we needed,” said Stoudemire, who was huge inside, particularly during a 17-2 run that started the second quarter. “I was just taking what the defense gives me, being aggressive, being patient. My teammates were looking for me out there and they were executing.”

Executing the game plan. Executing the Sixers, who hung tough through the likes of All-Star point guard Jrue Holiday (30 points) and forward Evan Turner (21).

Tempers flared at 7:29 of the third quarter. While positioning for a defensive rebound, Sixers center Spencer Hawes took a shot in the back of the head from Anthony.

“I didn’t mean to hit him in the head,” Anthony said. “It was just one them plays.”

When Hawes got in Anthony’s face, Tyson Chandler gave his Philly counterpart a shove. The refs reviewed the sequence, called a flagrant foul on Anthony and rapped both Chandler and Hawes with a technical foul.

“Just protecting my teammate, that’s all,” Chandler said.

Woodson said he was fine with the public show of emotion — as long as it didn’t cross any lines.

“I like them to direct it in the game. I don’t want to see guys get suspended or fined for throwing punches or anything of that nature,” Woodson said. “When you lose four in a row and we haven’t done that very often, you’re a little on edge a little bit and it’s my job as coach to make sure the guys just relax and just play.”

Despite the Sixers’ late charge and the Knicks’ inability to put the ball in the basket, it never seemed Philly had enough time. Always, the Knicks found something, whether a play by J.R. Smith (14 points) or Raymond Felton (14 points) or an Anthony free throw.

“We just wanted to get back to playing the way we were playing earlier in the year,” said Felton, who left in the third quarter with soreness in his Achilles but returned in the fourth. “That’s pushing the ball, being aggressive.”

And winning. No matter how.

fred.kerber@nypost.com