NEW YORK — Ryan Carter snapped a tie with 4:24 left, and the New Jersey Devils survived for a 5-3 victory over the New York Rangers after blowing a three-goal lead in Game 5 of the Eastern Conference finals on Wednesday night.

The Devils, who led 3-0 before the first period was half over, have a 3-2 edge in the series and can advance to face the Los Angeles Kings in the Stanley Cup finals with a win at home on Friday night. If the Rangers can stay alive then, Game 7 would be back in Madison Square Garden on Sunday.

The Devils seemed primed for an easy win when Stephen Gionta and Patrik Elias scored within the first 4:13 of the game. Travis Zajac made it 3-0 before the Rangers woke up and began chipping away.

Brandon Prust brought New York within 3-1 before the first period was over, and Ryan Callahan made it a one-goal game in the first minute of the second. The Garden really rocked when Marian Gaborik tied it at 3 just 17 seconds into the third with his first goal of the series.

But the comeback was all for naught. Carter put the Devils back in front, and Zach Parise sealed it with an empty-net goal in the closing seconds.

"I thought we probably played our best game of the series tonight," Rangers coach John Tortorella said.

Once Gaborik tied it with an unassisted goal that ricocheted in off the skate of goalie Martin Brodeur, it appeared the Rangers would ride the comeback all the way to one of the most stirring wins in team history – one that would rival victories over New Jersey in the classic 1994 East finals.

Carter made sure it wouldn't happen.

Ilya Kovalchuk knocked Michael Del Zotto off the puck in the right corner, and Gionta sent a pass in front to Carter – who had just charged in front from the bench – for a quick shot that beat Henrik Lundqvist.

"You have to (keep it together) this time of year," Gionta said. "You have to have a short memory. Fortunately we did and came out with the victory."

New Jersey was outshot 28-17 overall and had only six shots in the third period, but two of them went in. Now the Devils are on the verge of their first Cup finals appearance since they won their third title in 2003.

Brodeur who has been the backbone of every Devils championship kept his focus throughout the third period when he was loudly taunted with chants of "Mar-ty, Mar-ty" after New York got even.

The Rangers were ultimately done in by another terrible start. For the 13th straight game in these playoffs, the team that scored first in New York's contests has gone on to win. The Rangers had been on a pattern of win-one, lose-one, but now they are on the verge of elimination with their second two-game losing streak in a series this year.

The only time the Rangers have won two straight in a playoff series is when they overcame a 3-2 hole in the first round and knocked out Ottawa.

The Rangers burned their timeout in the first period, and Devils coach Peter DeBoer spent his with 10:17 left in the game after his club was forced to ice the puck. Parise implored his teammates on the bench to, `Come on boys.' and the messages from the coach and the captain did the trick.

New Jersey surely never thought it would be in this kind of fight after storming in front early.

Not only didn't the Rangers have the strong start they craved and insisted they needed, they were practically run out of their building less than 10 minutes in.

The same problems that plagued New York in its 4-1 loss in Game 4, when the Devils jumped out to a 2-0 lead in the first period, cropped up again in front of the home fans that grew frustrated and angry early.

Gionta got the Devils going 2:43 in when he gathered a rebound of Mark Fayne's shot right in front of Lundqvist, steadied himself without any pressure from the defense, and slipped in his third goal of the playoffs to start the barrage.

Elias made it 2-0 just 1:30 later on New Jersey's fourth shot of the night.

After Kovalchuk fumbled the puck just inside the blue line, he dived to keep it from leaving the Rangers' zone. The puck eventually came to Adam Henrique at the right point for a shot that was stopped by Lundqvist. Elias got it in front and scored his fourth.

Tortorella used his timeout then, but it made little difference. He appeared to be calm as he moved back and forth behind the bench while talking to his players. Whatever the message was didn't sink in.

New York generated a couple of scoring chances soon after that were either turned aside by Brodeur or thwarted by the Rangers themselves. Gaborik was set up in front after teammate Ruslan Fedotenko got the puck to him after a wraparound the Devils net, but the Rangers' struggling leading scorer fired a shot over the net from close range.

Fedotenko was in the middle of another chance moments later when he sent a shot in on Brodeur. The rebound came out to Derek Stepan, whose drive from in close was smothered by Brodeur.

The Devils shrugged those off and went back to padding their lead.

Just 5:26 after Elias' goal, Zajac made it 3-0 with his seventh of the playoffs. Bryce Salvador wiped out Rangers defenseman Ryan McDonagh in the offensive zone and started the play going the other way. Zajac got a clean shot from just inside the right circle that sailed past Lundqvist and beat him inside the left post at 9:49.

The tide began to turn the Rangers' way the rest of the period as they allowed only one shot the rest of the period and began cutting into the seemingly insurmountable deficit.

Prust, making his return following a one-game suspension for an elbow he delivered to the head of Devils defenseman Anton Volchenkov in Game 3, showed off a bit of scoring touch when he converted on a breakaway with 4:19 left in the first.

Devils defenseman Marek Zidlicky turned over the puck in the neutral zone to Fedotenko, who fed a pass to the streaking Prust in the New Jersey end. Prust surged past the hardcharging Zidlicky and slid a backhander past Brodeur for his first goal of the playoffs.

The Rangers managed to outshoot the Devils 9-6 in the lopsided first period, but continued their sudden defensive dominance well into the second.

But not before they cut the Devils' lead down to a goal just 32 seconds into the second.

Brandon Dubinsky, back from a foot injury, fired a shot from the left point that was deflected in front and caromed toward the left corner. Artem Anisimov flung the puck back toward the crease and it struck the left skate of the driving Callahan and got past Brodeur. The goal stood up after a brief video review.

New Jersey didn't record its first shot of the period, and its second since its third goal, until Henrique put a puck in on Lundqvist 6:23 into the frame.

Lundqvist made just 12 saves en route to the loss and the Rangers allowed five goals for the first time all postseason.

To make the finals now, New York will have to win a third consecutive seven-game series. The Rangers have already played 19 postseason games.

Notes: Dubinsky had been sidelined since he was injured in the Rangers' victory over Ottawa in Game 7 of the first round. He sat out all seven games of the second round against Washington and the first four against New Jersey. John Mitchell was scratched to make room in the lineup. Prust's return forced D Steve Eminger to sit out after he played the two previous games. ... Kovalchuk now has 10 assists in the postseason.