INDIANAPOLIS — Indiana spent the entire season perfecting its defense.

On Saturday, it produced the biggest payoff for the Pacers in nearly a decade.

Roy Hibbert’s block of Carmelo Anthony’s dunk attempt midway through the fourth quarter spurred an 11-2 run that rallied the Pacers to a 106-99 victory in Game 6 of their second-round series, sending them into their first Eastern Conference finals since 2004.

New York native Lance Stephenson scored nine points in the run, finishing with a playoff-career-high 25.

“That’s why they pay me the big bucks this summer, so I have to protect the paint,” said Hibbert, who signed a $58 million contract last summer. “If all else fails, meaning the offense, I have to protect the paint.”

With players from both teams standing on the court as the final seconds ticked off and Pacers fans roaring in appreciation, the sellout crowd wasted little time breaking into chants of “Beat The Heat!”

For Indiana, it sets up a postseason rematch with the defending NBA champs, the team that eliminated them last May after the Pacers had taken a 2-1 lead in the best-of-seven semifinals. The Heat wound up winning Game 4 at Indiana and followed that with two more wins as Danny Granger struggled with a knee injury.

Indiana used the lessons from that series as motivation to improve this season and wound up beating the Heat twice at home before losing the third game of the season series at Miami. The Pacers will return to South Florida for Game 1 on Wednesday night.

With Granger missing all but five games this season because of the lingering knee injury, the Pacers put an even greater emphasis on playing defense and it showed.

Indiana led the league in rebounding, defensive field-goal percentage and defensive three-point percentage while finishing second in points allowed per game during the regular season. It was no different in the playoffs, as the Knicks found out.

New York had another subpar shooting night, making just 40 percent of its shots, and again wound up on the wrong side of a 43-36 rebounding discrepancy. In the paint, New York was outscored 52-20, and Anthony, who finished with 39 points, scored just four points in the final 12 minutes when he went 2 of 7 from the field.