NBA

After awful first half, Knicks rally past Nets

This was more survival than statement for the Knicks. And Carmelo Anthony was the reason they survived again.

The Big Apple 3 almost wasn’t big enough. With lots of their flaws showing, the Knicks rallied from a 16-point deficit in the second quarter, absorbed the Garden boos for allowing 68 first-half points and eked out a defenseless dogfight against the woeful Nets, 120-116.

In the end it was too much Anthony, who was facing the Nets for the first time since they lost out in the derby. He scored 39 points and had 10 rebounds. With a series of spinning turnarounds and runners, Anthony scored 20 points in the third quarter — with owner James Dolan clapping madly — when the Knicks made their surge after a disgraceful 68-58 first half.

“We were kind of dead in the first half,” Anthony said. “We were dead. I just figured if I went out there and showed some effort, some intensity, some energy the guys would follow what I was doing there and pick it up.”

But despite all of Anthony’s heroics, the undersized, rebounding-poor Knicks needed to go down to the last seconds for their second straight win that cut their magic number to three games as they stayed 4½ games ahead of the ninth-place Bobcats.

Deron Williams, coming back from a six-game absence, missed a potential game-tying 18-footer with 4.7 seconds left. Williams pulled up, got space on Anthony Carter for a wide-open look, but banged it off the front iron. That’s how close this came to disaster.

“I got a good look,” Williams said. “I just kind of rushed it.”

Amar’e Stoudemire scored 23 points but had just one rebound. Point guard Chauncey Billups outplayed the rusty superstar Williams (22 points, eight rebounds and eight assists). Billups had 33 points, six assists and no turnovers as the Knicks’ Big Apple 3 rang up monster scoring totals. They accounted for 95 of the Knicks’ 116 points.

“It stinks having them on the same team,” Williams said. “They’re going to be good. They’re just trying to figure things out. Everybody wants it to happen overnight. It’s not going to happen. It didn’t happen for Miami. It took them a while for them to gel. They have to learn to play with each other. They got two go-to scorers. They have to learn to play with each other.”

Anthony keeps putting up raging numbers. Anthony made 15 of 26 shots and has scored 36, 39 and 39 points in his last three games.

“They were falling again tonight,” Anthony said. “I was just taking advantage of how they were guarding me out there.”

Said Stoudemire: “Anytime you get the star player to play as hard as he did in the third quarter it is contagious. I think we all picked it up from there.”

Nets coach Avery Johnson, who had recently said he’s glad he lost out on Anthony, wasn’t overly impressed afterward.

“He had 26 shots,” Johnson said. “It’s not like he scored 39 on 14 shots. He took high volume shots.”

This hardly was a victory the 37-38 Knicks can puff out their chests about. Their lack of size and rebounding was too evident, their bench grows increasingly thinner and their second star, Stoudemire, has hit the wall, his energy on the defensive end depleted. In securing just one rebound, he got boxed out by the Nets all the way to Brooklyn.

“He knows he has to rebound,” D’Antoni said. “He’ll get his legs back.”

The Knicks are likely to secure a playoff berth, but their projected first-round matchup vs. the Celtics might not be pretty if they don’t tighten things up.

“We kept scrapping, and fighting,” Billups said. “It’s not a great feeling when you walk off the floor at the half and you see 68 points on the board, but we regrouped. We’re fighting for our lives, and it’s great to have a challenge like what they gave us tonight. And better to win one like that.”

Nets center Brook Lopez shredded the Knicks in the first half, scoring 22 of his 26 points as the Knicks were outrebounded 51-39.

“They had 18 second-chance points in the first half, you can’t do that,” DAntoni said.

If the Knicks didn’t get good fourth-quarter contributions from backup point guard Anthony Carter and new center Shelden Williams, they might have been out of luck. Carter hooked up three times with his former Denver teammate in the fourth quarter for buckets.

Anthony did just enough to pull it out in the end.

With a lefty dribble, Anthony cut into the corner, stopped on a dime and shot over Travis Outlaw to give the Knicks a 116-114 lead with 1:07 left. Toney Douglas secured an offensive rebound, was fouled and made both free throws to go up 118-114 and they hung on.

“I always have concerns, but the thing we’re trying to stress with our players the things we have to improve are inside our locker room,” D’Antoni said.

marc.berman@nypost.com