The Knicks couldn’t close out the Suns in regulation because of a controversial last-second foul on Kenyon Martin, but better late than never — the story of their new year.

The 2014 portion of the schedule continued to be “pret-ty, pret-ty good’’ — to quote Garden attendee Larry David — as their defense is becoming pretty, pretty great.

The Knicks repelled the pesky Suns 98-96 in overtime Monday night as they held Phoenix without a field goal during the five-minute session, to post their fifth straight win and improve to 6-1 since the ball dropped in Times Square. They moved into a tie for the eighth seed in the Eastern Conference.

“One of those games we lost early on in the year,’’ point guard Raymond Felton said.

The Suns, a surprising 21-16, shot 0-for-7 in overtime and even their magical lefty point guard Goran Dragic went cold with two straight in-close, driving misses in the final minute.

The Knicks (15-22), after holding a 14-point lead in the first half, fell behind by five with 4:50 left in the fourth before rallying.
“We lost some close games early in the year and I cost some of the games,’’ coach Mike Woodson said. “We didn’t do the right things. I think now in close games, we are starting to figure things down in the end. Even down five, when I called a timeout, I think guys felt good.’’

Though he missed a chance to seal the game with a missed jumper with 12 seconds left in the fourth quarter, Carmelo Anthony finished with 29 points, 16 rebounds and four assists. He shot 9 of 24, but hit a big baseline turnaround with 1:20 left in overtime to put the Knicks up 98-93. Anthony’s jumper to start overtime put the Knicks in the lead for good and Kenyon Martin’s putback gave them a four-point bulge.

“We won the game on the defensive end,’’ Anthony said. “Now, as a team mentally, we are a different type of team. We are starting to believe that when we do get down, we still have a chance to win the game. That is a good sign.’’