NBA

Knicks keep homecourt with 2nd-half shutdown of Celtics

(
)

Game 2 was déjà vu.

For the second straight playoff game at the Garden, Carmelo Anthony erupted as the Celtics offense disintegrated in the second half. The Knicks awoke from a first-half slumber with another historic defensive performance in the 87-71 victory to ensure they are heading to Boston with a 2-0 first-round series lead after taking care of homecourt with a flourish.

Anthony finished with 34 points, making 8 of 13 shots in the second half, pounding the Celtics with jump shot after jump shot. J.R. Smith, newly minted Sixth Man Award winner, added 19 points after receiving a wild standing ovation before the game as he was presented the trophy.

PLAYOFF SCHEDULE

PHOTOS: BEST PLAYOFF MOMENTS

The Celtics shot 37.1 percent and were held to 23 second-half points — a franchise playoff record for the Knicks, erasing the previous mark they set Saturday in allowing 25 second-half points.

“It was just a tale of two halves today and last game,’’ Anthony said. “We just had to find a rhythm, find some shots in the second half.’’

Now the series shifts to Boston on Friday — the Celtics’ first home game since the bombing at the Boston Marathon. Even a fired-up Beantown crowd may not be able to help the Celtics, who without the injured Rajon Rondo do not have a point guard to run their offense.

“We have to prepare for the emotions that will be taking place in Boston on Friday,’’ Anthony said. “But as a team, we got to go in there and stay together knowing it’s going to be very emotional in that building. But we’re going in to win that game.”

It was quite spirited at the Garden, too. Smith had dazzling final 6.3 seconds of the first quarter in which he made a stepback jumper, forced Paul Pierce (18 points) into a turnover and swished a buzzer-beating 39-footer.

“Fans were great,’’ Smith said. “It was an out-of-body experience to get a standing ovation at the Garden.”

The Garden jeered Kevin Garnett as the Celtics star center was riddled with foul trouble, finishing with 12 points. The Garden also rang out with periodic “Boston Sucks!” chants, indicating the world was getting back to normal.

“Homecourt is what we played for all season,” Mike Woodson said. “We did what we were supposed to do here at home and now we have to travel to a hostile environment.”

The Knicks fell behind by nine in the second quarter and trailed 48-42 at halftime. But the Celtics fell apart in the third quarter, getting outscored 32-11 by the rampaging Knicks, who still won’t let the Celtics break 80. They won the opener, 85-78.

Anthony, who had called the game a “must-win,” went on a tear after a poor first half in which he shot 3-for-11. The explosive third quarter was highlighted by Anthony’s 13 points on 5-of-6 shooting. He made 3-pointers, turnaround jumpers and capped it with a hard drive past Pierce for a dunk with 31.8 seconds left in the quarter to put the Knicks up 74-59 after three.

Though Anthony is averaging 35 points in the series, he still hasn’t shown the rhythm he displayed for much of April.

“I missed some shots I normally make, but my teammates are giving me a lot of help offensively and we have each other’s back defensively,’’ Anthony said.

Woodson said, “In the playoffs, it’s not going to be perfect for any player and Melo struggled [early]. But at the end of the night, he made the plays we need him to make. He figures it out, and the great ones do that.’’

Starting the second half down six, the Knicks had a renewed energy level led by Iman Shumpert, who promptly bagged two straight 3-pointers to ignite an early 10-2 run. Raymond Felton also played with zeal in the final two quarters, finishing with 16 points, no turnovers and seven rebounds.

“The playoffs is really about adjustments,” Felton said. “You have to make it at halftime and we did it both games.”

Down 14 points, Boston coach Doc Rivers surrendered with about four minutes left.

“I don’t think we came out with the same mentality in the second half,’’ Rivers said.

Rivers then knocked the cliché that a series does not start until a club loses on its home court.

“I’m pretty sure the series has started because we’re down 2-0,” Rivers said.

marc.berman@nypost.com