Carmelo Anthony rose up at the top of the key, lining up a three-point attempt, the score far closer than the Knicks anticipated, and with the weight of 18 straight misses beyond the arc in the series on his shoulders.

But Anthony’s confidence was pure — impervious to the chants of the crowd at TD Garden, to the talk of funerals and overconfidence. He drained the shot and suddenly the arena went almost silent. The shot, a final wound to a Celtics squad that had fought far beyond anyone’s expectations outside of their locker room, propelled the Knicks to an 88-80 series clinching win.

The victory exorcised not only the ghosts of Celtics glory, ending the run for the aging Boston squad, but the Knicks’ own ghosts. The Knicks had not won a playoff series since 2000, but with a 4-2 victory in the best-of-seven series they move on to the Eastern Conference semifinals where they will face the Indiana Pacers, who finished off the Atlanta Hawks on Friday.

Game 1 is set for Sunday at Madison Square Garden.

Anthony led the Knicks with 21 points, but to get this one done it took efforts up and down the lineup. And in defeat, the Celtics saw their stars exit, maybe for the last time.

Paul Pierce was just 4-for-18 shooting and Kevin Garnett had 15 points and 10 rebounds, and not enough help.