“I’m really happy with the way we just stayed with it and found a way to win it,” coach John Tortorella said.

Brad Richards tied it for the Rangers with 2:57 left in regulation after New York blew an early 2-0 lead and fell behind already-eliminated Carolina.

“We just kept on playing, scored an ugly one and couldn’t be more fitting than the guy who scored the winner,” Tortorella said. “Funny how the hockey gods work in these type of situations.”

Derek Stepan and Derick Brassard staked the Rangers to the lead in the first period, and Henrik Lundqvist stopped 18 shots for New York, the second New York team this week to clinch a playoff spot on Carolina’s ice.

“Excitement, joy, relief,” Lundqvist said. “You talk about going into the season that of course our expectations are high and this and that, but you see a lot of teams around the league, they’ve had to work really hard to get in. So we should be proud of how we came together, especially these last three or four weeks here.”

The Rangers are 9-3-1 in their last 13 games and jumped over the rival Islanders — who wrapped up their postseason berth here with a shootout loss Tuesday night — and into seventh place in the East with one game left.

Jiri Tlusty had two goals and Tuomo Ruutu also scored for Carolina, which played without injured forward Alexander Semin. He sat out after sustaining a concussion that also will sideline him for the season finale at Pittsburgh on Saturday.

Dan Ellis finished with 34 saves for Carolina.

“We could be a team that just goes out there and just finishes up these last few games, but the respect of the league and everything, we’re going out to win every game,” Hurricanes coach Kirk Muller said. “And our guys went out and did that.”

The Rangers — who were in danger of falling below the playoff cut line with a loss — pushed this one into overtime with a bizarre goal.

Richards uncorked a shot from the blue line that bounced hard off the end boards and clicked off Ellis’ right skate and into his own net.

“There’s times that we haven’t worked for our bounces,” Ellis said. “Tonight I think we did work for our bounces and we just got one against us.”

All of a sudden, the Rangers had hope.

“We know that we’re right there to get that next point and advance in the playoffs,” Callahan said.

He took care of that himself, ending it by scooping up the puck by the boards, skating in on Ellis and snapping it toward the far side. The puck glanced off the post on its way in and sent the Rangers spilling onto the ice in celebration.

“That was just a sick play from start to finish,” Lundqvist said, “and it’s a good thing to see your captain put it home and put us in the playoffs.”

The Hurricanes led for most of the third period after Tlusty’s second goal came 49 seconds in.

They had long since been eliminated from playoff contention, so for them, this game was meaningful for a different reason.

Forward Jared Staal, recalled from the minor leagues on Wednesday, joined two of his older brothers in the starting lineup against the Rangers — fourth brother Marc’s team, though he has been out since early March after taking a puck to his eye.

It is the 10th time that three brothers played for the same team in the same season in North American major pro sports history and the first time since the Statsnys did it for the Quebec Nordiques in 1985, according to STATS.