Jeff Hornacek threw his arms in the air after a bad offensive possession and put his hand on his forehead after another one moments later. The Knicks’ bad sequences are not only on defense.

But the Knicks already made the head-shaking and headline-grabbing move Tuesday of putting Kurt Rambis in charge of the defense, which still has plenty of holes. They’re not about to make someone just the offensive coach. That’s Hornacek, with plenty of input from triangle enthusiast and team president Phil Jackson.

The Knicks’ offense sputtered early but came in late in Wednesday night’s 110-96 win over the Nets. Their best sets consisted of getting the ball to Carmelo Anthony in the third quarter and everybody getting out of the way and pick-and-rolls between Brandon Jennings and Kristaps Porzingis in the fourth.

Anthony scored the Knicks’ last 14 points of the third quarter en route to a 22-point night. Porzingis finished with 21 points and Jennings 11 assists.

This was a much-needed win for the Knicks, who seem as if they’ve played more than seven games because of all the drama that’s constantly swirling around this team.

“Everybody thinks the sky is falling,” Hornacek said. “But I don’t think any of our guys, any of the coaches, anyone in the organization, is panicked about it. We know these guys just got together in these last few weeks with Derrick [Rose] coming back. Are there things we can do better? Sure. We will get better.”

advertisement | advertise on newsday

With the grumblings over the triangle offense, and the Knicks’ constant lack of defense it’s as if this is a continuation of last year and the year before that — basically each season under Jackson.

He wants Hornacek to run the triangle offense, and it’s safe to assume it was Jackson’s call to pick Rambis to run the defense.

Jackson brought Rambis in as an associate head coach, made him the interim coach last year and had him on a very short list of candidates before Hornacek was given the job. But Hornacek said Jackson is giving him the freedom to do what he wants and that it’s a collaborative effort.

“We’re trying to all work together to get this team to win and get back in the playoffs,” Hornacek said.

The Rambis’ move could work. They are no longer switching pick-and-rolls and still getting used to some calls. But it’s going to take some time before it can be fully judged.

“On the offensive end it’s cool, but defensively that’s where everybody’s worry is,” Rose said.

Wednesday night was a good first step as the Knicks increased their intensity and energy on defense after an uninspiring start. The rebuilding Nets, playing the second game of a back-to-back while the Knicks last’ game was Sunday afternoon, led by 14 in the first quarter and shot 55 percent in the first half.

Courtney Lee said Hornacek came in the locker room at halftime “and snapped on us” for the defensive effort, and the Knicks responded.

The Nets showed weary legs and shot 3-for-19 in the third quarter and were 11-for-40 with 41 points in the second half. It was the perfect remedy for the ailing Knicks.

“We looked like we had a back to back, not them, the first half,” Porzingis said. “Then the second half we understood what we had to do.”