NBA

Knicks one game out after stunning Golden State

OAKLAND, Calif. — It’s down to one.

With Atlanta in freefall, the Knicks are lucky to be alive. And so they are very much, closing to one game of the final playoff spot with a 89-84 upset victory in a surprising defensive struggle over the Warriors at Oracle Arena, when they shut down Stephen Curry twice in the final 30 seconds.

The Knicks used rare gritty defense and a 15-0 run late in the second quarter to keep their postseason dreams alive. They had lost 10 of their last 11 games in Oakland before rising to the challenge — and bottling up Curry on the final possession.

“Our defense finally stepped up,’’ coach Mike Woodson said.

The Knicks moved to 2-2 on their five-game West Coast trip. With eight games left, the Knicks finish up the Western trip Monday in Utah. The Hawks face the Sixers.

“If we head home, get [Monday] night, it will be a great road trip,’’ Carmelo Anthony said. “We control our own destiny. I just hope we win and bring the same mindset and focus into Utah.’’

The Knicks had allowed 127 points in Los Angeles, including a 51-point third quarter, and 112 in Phoenix before buckling down in Oakland, where team president Phil Jackson continued to stay away.

Smith, who has been rising as a secondary scorer, finished with 19 points at halftime on 8 of 11 shooting and wound up with 21. Anthony finished with just 19 points but had four in the final 1:30. He shot 7 of 21. Amar’e Stoudemire was a beast on the boards, finishing with 15 points and a season-high 13 rebounds.

‘For us to bounce back after that loss in Phoenix, We did a great job tonight,’’ Anthony said. “It says a lot we can put this stuff behind us quickly.’’

Curry scored 32 points but with the Knicks up three, Curry’s straightaway trey with 30 seconds left was in and out and Raymond Felton grabbed the rebound.

A shot clock violation was called with five seconds left as Anthony couldn’t get off the shot after making a move on Andre Iguodola, who slapped the ball away.

The Warriors had one last chance to tie. Curry got it and double-clutched with Felton hounding him. He fed Draymond Green, but the pass was deflected by Felton. Green bobbled the ball and Shannon Brown, in for defensive purposes, stole it for the win.

Felton has struggled defensively for much of the season but was big Sunday on the game’s final play.

“It was, ‘Make sure he didn’t get the ball,’ ’’ Felton said of Curry. “He’s hitting a lot of shots all year. He’s a great player and had it going. That’s the guy they’re going to go to at the end. It was my job to make sure he didn’t get a shot.’’

The Warriors were without their starting frontcourt as David Lee (hamstring) and Andrew Bogut (pelvis) and Jermaine O’Neal and Marreese Speights started in their stead.

With Anthony on the bench with three fouls, the Knicks closed the first half on a wild 15-0 spree. Smith and Tim Hardaway Jr. combined to score all the points as the Knicks were on the run and moving the ball.

Felton also keyed the game-turning run that flipflopped a 44-41 deficit into a 12-point halftime lead at 56-44.

Hardaway finished with 15 points, playing his first game in Oakland, where he was born. Hardaway wears No. 5 in honor of his father, Tim Hardaway, who wore the number as a Warriors rookie.

While Anthony sputtered down the stretch, Hardaway Jr. drained an ice-in-his-veins 3-pointer from the left wing to put the Knicks up six with 3:30 left.

Anthony needed all the help and Smith is emerging as his trusty wingman again.

“It was big time,’’ Anthony said of the production of Smith, Hardaway and Stoudemire. “Even when I got in foul trouble in the first half, they picked it up and got the job done. Everyone contributed. It’s a great team win for us.’’

“I feel like we want it,’’ Felton said. “We got to go out and go get it. It’s there for us. We have a great opportunity.’’

Before the game, when asked about the Hawks’ losing ways, Woodson said: “It’s right there in our hands.’’

It is. It really is.