NEW YORK — The 8 points they allowed in the fourth quarter didn’t come out of nowhere, they weren’t a fluke. Despite the fact that the Knicks had, of late, relied more on their offense than their defense to win games, that wasn’t sustainable. Not in the playoffs.

So, when the Knicks got down by 7 points with 1:20 left in the third quarter, their largest deficit of the game, they knew something had to change. And they changed it, allowing the Celtics just 8 points in the final 12 minutes en route to an 85-78 win at Madison Square Garden in the opener of their Eastern Conference quarterfinal series.

“That’s how it’s got to be,” coach Mike Woodson said after the Knicks won only their second playoff game since 2001. “When you’re struggling to make shots, you’ve got to damn sure make sure that they’re not making them.”

Advertisement - Continue Reading Below

Woodson said it was as solid as the team has been all year on the defensive end. The Knicks had 15 steals — nine in the second half — while the Celtics finished with 21 turnovers, of which Paul Pierce said, “Some were forced, some were just boneheaded plays.”

“It was just a matter of us wanting it,” said the Knicks’ Carmelo Anthony, who had four steals. “We willed our way on the defensive end. When we play defense like that, get out in transition, get easy baskets, everybody is a part of the game, and that opened the game up.”

Much of that will came in the form of yeoman’s work by Jason Kidd and Kenyon Martin. The veterans — a combined 75 years old — routinely got hands on Celtics passes, grabbed offensive rebounds, made the efforts that were needed to make the game winnable for the Knicks.

There was Kidd, who had three steals in 35 minutes off the bench, tipping away passes to turn possessions from defense to offense.

“Jason, he’s been doing this all season. What can you say?” Woodson said. “Loose balls. Strips. Keeping balls alive. He just seems to be in the right place at the right time.”

So was Martin, especially helpful when center and defensive force Tyson Chandler, just back from being out six games with a bulging disk in his neck, wasn’t at his best.

Chandler, who said his conditioning was more of a problem than the neck, didn’t play a single minute in the fourth quarter. Martin played all 12.

“The way Kenyon was playing, he didn’t deserve to come out,” Chandler said. “Playoff basketball, you’ve got to ride with what’s going well.”

Using Martin — who finished with 10 points and 9 rebounds, 5 offensive — was part of changing what had happened in the first half, when the Celtics kept up with the Knicks, taking a 53-49 lead into intermission.

“We made some adjustments,” Woodson said. “Our backside defense wasn’t solid. We were pretty good on the strong side of the ball, but our backside was awfully weak. We went back in and looked at some of that, so we adjusted there.”

They adjusted, too, on their pick-and-roll defense. It made the difference.

The change was particularly notable on Jeff Green, who exploded for 20 points in the first half, but was held to just 6 in the second.

Anthony switched into coverage on Green, which helped make the difference. As Woodson said, “Our defense did a great job on him the second half. We had nothing for him in the first.”

“We came out with urgency, wanting to protect our home floor,” Chandler said. “The way we executed down the stretch was incredible.”

They hadn’t been guarding the paint well enough, allowing the Celtics to get 22 points before halftime. Once that defense was tightened up, the Knicks allowed Boston just 8 points in the paint in the second half.

“They got a lot of layups,” Kidd said. “At this time of year, you can’t give up those type of plays because they can just wear on you, and it puts a lot of pressure on you on the offensive end.”

That included consecutive Avery Bradley layups with less than five minutes to go in the first half. Bradley exposed a weakness in the Knicks’ interior defense, slipping through with almost no trouble.

Those lanes weren’t open in the second half. That’s what the Knicks had to do, and that’s what they did.

“It was just a total team effort in terms of how we covered for one another when there were breakdowns defensively in the second half,” Woodson added. “It was the defense that held us in there.”