Ryan McDonagh, Derek Stepan and Martin St. Louis of the...

Ryan McDonagh, Derek Stepan and Martin St. Louis of the Rangers celebrate after Stepan's game-winning goal against Anton Khudobin of the Carolina Hurricanes during the third period of their game at PNC Arena on March 7, 2014 in Raleigh, N.C. Credit: Getty Images / Grant Halverson

It took four third-period goals -- including Derek Stepan's winner on a pretty cross-crease pass from Martin St. Louis during a five-on-three power play with 2:46 left in regulation -- for the Rangers to rally past the Carolina Hurricanes, 4-2, Friday night.

The comeback win broke a three-game losing streak and kept the Rangers (34-26-4, 72 points) in a playoff spot with 18 games remaining.

It wasn't easy. Anton Khudobin (40 saves) blanked the Rangers for 40 minutes, stopping their first 27 shots. Carolina went ahead 1-0 on Jordan Staal's short-side wrister at 17:49 of the first period and took a 2-1 lead on Jeff Skinner's penalty shot -- the fourth such goal allowed by Henrik Lundqvist this season -- at 12:07 of the third.

Plus an apparent goal by Mats Zuccarello, who returned after fracturing his hand while playing for Norway in the Olympics, was waved off.

"We stayed patient," said St. Louis, playing his second game since being acquired from Tampa Bay for Ryan Callahan on Wednesday. "You get a five-on-three at the end of the game, you've got to make it count. With a minute and a half [of the two-man advantage], you don't want to rush anything. It's not like you need two goals, you need one. We didn't panic. This is how it's played in the playoffs. This is the way we want to play right now so we don't have to turn the switch on in the playoffs."

The Rangers tied the score at 1 at 7:25 of the third period when defenseman Ryan McDonagh scored his second shorthanded goal in two games with a shot that deflected off defenseman Andrej Sekara's stick. Just 1:17 after Skinner's goal, Rick Nash tied it at 2-2 when he scored on a bad-angle shot from the right boards that also deflected off Sekara's stick.

After the four-on-four goal by Nash -- who had set up McDonagh earlier -- Carolina let the game slip away at PNC Arena, where the Rangers now have won six straight.

The five-on-three power play was set up when Ron Hainsey cleared the puck over the boards and Brett Bellmore committed the same infraction.

And when the Rangers needed someone to make a play at the end, St. Louis provided it. "That's what he's here for," Brad Richards said. "No matter what goes on during the night, he loves being down there."

When Carl Hagelin scored an empty-netter with 41 seconds to play, the Rangers exhaled, having sealed their first win since a 2-1 victory over Chicago at Madison Square Garden on Feb. 27.

"Coming off a couple losses, we needed this badly," Lundqvist said. "It was great to see the way we responded in the last six minutes."

More Rangers