Deny, deny, deny was the Knicks’ defensive strategy against Steph Curry and yet in the closing seconds and with the game on the line, the most dangerous shooter on the floor had the ball in his hands.

And he passed.

“I don’t know, it happens,” Carmelo Anthony said when asked if he were surprised by Curry’s decision. “I do it sometimes.”

When a reporter replied “when,” Anthony laughed and said: “Come on, man, I’m trying to make him feel better. You’re damned if you do, damned if you don’t.”

The Knicks were in that kind of mood on Sunday night as they overcame a 12-point first-half deficit and defeated the Golden State Warriors, 89-84. The win, sealed when Curry’s pass was intercepted by Shannon Brown with 1.9 seconds left, moved them to within one game of eighth-place Atlanta entering Monday’s game against the Utah Jazz, the finale of their five-game western trip.

“We can’t worry about Cleveland, Atlanta, Charlotte, we control our own thing,” Anthony said after the Knicks improved to 31-43. “We play like we did tonight, play hard and focus on what we have to focus on we’ll be all right. When we have games like we did in L.A. and Phoenix and you look back and think, ‘What the hell are we doing? Do we want it or not?’ Tonight we showed we wanted it.”

The Knicks scored just 33 second-half points and Anthony, limited to 11 first-half minutes due to foul trouble, was hardly at his best. He finished with 19 points on 21 shots. Instead, Mike Woodson’s team produced its biggest road win of the season by winning on the defensive end.