Yegor Sharangovich scored the go-ahead goal at 12:36 of the third period and the New Jersey Devils snapped a 10-game winless streak with a wild 6-4 victory over the Philadelphia Flyers on Tuesday night.

Nico Hischier, Pavel Zacha, Miles Wood and Connor Carrick also scored for the Devils, who saw the Flyers rally from third-period deficits twice to tie the game.

More Images
New Jersey Devils left wing Mikhail Maltsev (23) scores an insurance goal during the third period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Yegor Sharangovich scored the go-ahead goal at 12:36 of the third period and the New Jersey Devils snapped a 10-game winless streak with a wild 6-4 victory over the Philadelphia Flyers on Tuesday night.

New Jersey Devils center Nico Hischier (13) takes a shot on Philadelphia Flyers goaltender Brian Elliott (in pads) with Devils left wing Jesper Bratt (63) wincing in front of Elliott on a Devils power play during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Hischier's shot went in for a Devils goal. Flyers center Scott Laughton (21) and defenseman Travis Sanheim (6) look on. (AP PhotoKathy Willens)

“It feels much better to come in the locker room and celebrate a win,” Hischier said. “And we got to learn from that. I think if you look at the game, wasn’t easy, but we found a way to bounce back every time. And at the end of all the matters is we broke that streak and finally got a win.”

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Lindblom started the Flyers' comeback, scoring 15 seconds after Wood.

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Sharangovich got the winner 11 seconds later when Elliott and his defenseman misplayed the puck behind the net, and the Russian rookie deposited it into a vacant net.

New Jersey Devils defenseman Damon Severson (28) celebrates with New Jersey Devils left wing Miles Wood (44) after Wood scored a goal against the Philadelphia Flyers during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

“We need to be better,” Couturier said. "We need to be more ready from the start of the game and be tougher to play for a whole game. We can be on and off. When we’re on, we’re one of the best teams, but we got to be more consistent.”

Philadelphia Flyers defenseman Philippe Myers (5) skates away as New Jersey Devils center Jack Hughes (86) congratulates teammate Pavel Zacha (37) after Zacha scored during the second period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. Devils center Nico Hischier (13) and left-wing Jesper Bratt (63) join the celebration. (AP PhotoKathy Willens)

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP_Sports

Philadelphia Flyers center Sean Couturier (14) reacts as New Jersey Devils goaltender Mackenzie Blackwood (29) makes a save with New Jersey Devils defenseman Ryan Murray (22) and other Devils defenders during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Philadelphia Flyers center Sean Couturier (14) reacts as New Jersey Devils goaltender Mackenzie Blackwood (29) makes a save with New Jersey Devils defenseman Ryan Murray (22) and other Devils defenders during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

The puck slips past Philadelphia Flyers goaltender Brian Elliott on a goal byNew Jersey Devils center Pavel Zacha during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

The puck slips past Philadelphia Flyers goaltender Brian Elliott on a goal byNew Jersey Devils center Pavel Zacha during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

A goal scored by Philadelphia Flyers left wing Oskar Lindblom goes in behind New Jersey Devils goaltender Mackenzie Blackwood, as Blackwood is upended on the play during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Flyers center Nolan Patrick (19) is in front of the crease along with a host of Devil defenders. (AP PhotoKathy Willens)

A goal scored by Philadelphia Flyers left wing Oskar Lindblom goes in behind New Jersey Devils goaltender Mackenzie Blackwood, as Blackwood is upended on the play during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Flyers center Nolan Patrick (19) is in front of the crease along with a host of Devil defenders. (AP PhotoKathy Willens)

Philadelphia Flyers center Claude Giroux (28) watches his shot slide past the goal line behind New Jersey Devils goaltender Mackenzie Blackwood (29) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Devils center Pavel Zacha (37), defenseman Ryan Murray (22), and left-wing Jesper Bratt (63) all watch the shot. (AP PhotoKathy Willens)

Philadelphia Flyers center Claude Giroux (28) watches his shot slide past the goal line behind New Jersey Devils goaltender Mackenzie Blackwood (29) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Devils center Pavel Zacha (37), defenseman Ryan Murray (22), and left-wing Jesper Bratt (63) all watch the shot. (AP PhotoKathy Willens)

New Jersey Devils goaltender Mackenzie Blackwood (29) winces as Philadelphia Flyers center Claude Giroux (28) scores a goal against him by flicking the puck over his left leg pad during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N. (AP PhotoKathy Willens)

New Jersey Devils goaltender Mackenzie Blackwood (29) winces as Philadelphia Flyers center Claude Giroux (28) scores a goal against him by flicking the puck over his left leg pad during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N. (AP PhotoKathy Willens)

New Jersey Devils defenseman Connor Carrick (5) celebrates his goal against Philadelphia Flyers goalie Philadelphia Flyers goaltender Brian Elliott (37) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

New Jersey Devils defenseman Connor Carrick (5) celebrates his goal against Philadelphia Flyers goalie Philadelphia Flyers goaltender Brian Elliott (37) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Mackenzie Blackwood made 26 saves as the Devils ended an 0-9-1 skid and won for the first time since April 8. Mikhail Maltsev scored into an empty net in the waning seconds to ice the game.

New Jersey Devils left wing Mikhail Maltsev (23) scores an insurance goal during the third period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

New Jersey Devils left wing Mikhail Maltsev (23) scores an insurance goal during the third period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

“It feels much better to come in the locker room and celebrate a win,” Hischier said. “And we got to learn from that. I think if you look at the game, wasn’t easy, but we found a way to bounce back every time. And at the end of all the matters is we broke that streak and finally got a win.”

Oskar Lindblom, Philippe Myers, Claude Giroux and Sean Couturier scored for the Flyers, who had rallied from a late two-goal deficit on Sunday to beat the Devils in a shootout. Brian Elliott made 21 saves for Philadelphia, whose playoffs hopes are all but gone.

The Devils built a 3-1 lead after two periods on power-play goals by Hischier and Zacha, and Wood's third goal in as many games.

New Jersey Devils center Nico Hischier (13) takes a shot on Philadelphia Flyers goaltender Brian Elliott (in pads) with Devils left wing Jesper Bratt (63) wincing in front of Elliott on a Devils power play during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Hischier's shot went in for a Devils goal. Flyers center Scott Laughton (21) and defenseman Travis Sanheim (6) look on. (AP PhotoKathy Willens)

New Jersey Devils center Nico Hischier (13) takes a shot on Philadelphia Flyers goaltender Brian Elliott (in pads) with Devils left wing Jesper Bratt (63) wincing in front of Elliott on a Devils power play during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Hischier's shot went in for a Devils goal. Flyers center Scott Laughton (21) and defenseman Travis Sanheim (6) look on. (AP PhotoKathy Willens)

Lindblom started the Flyers' comeback, scoring 15 seconds after Wood.

The third period was crazy with six goals. Myers, scoring for the first time in 37 games this season and Giroux, who scored the Flyers two third-period goals Sunday, scored in the opening 3:34 to tie the game at 3-all.

Carrick, who spent most of the season in the AHL, scored his first at 8:04 to give the Devils the lead, but Couturier tied the game at 12:25 with a shot from the side board.

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Sharangovich got the winner 11 seconds later when Elliott and his defenseman misplayed the puck behind the net, and the Russian rookie deposited it into a vacant net.

“There’s been a few times where we’ve let those slip away this year and obviously we need to continue to work out learning how to win, and I think tonight was a step in the right direction for that,” said Devils defenseman Ty Smith, who had two assists.

The Flyers had two great chances to tie the game with their net empty. Devils defenseman Matt Tennyson used his stick to prevent Couturier from tying the game after he beat Blackwood, who also stopped Giroux in close before the Maltsev goal.

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Philadelphia Flyers goaltender Brian Elliott (37) tries making a save as New Jersey Devils left wing Janne Kuokkanen (59) and Philadelphia Flyers defenseman Ivan Provorov (9) watch during the first period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

“We need to be better,” Couturier said. "We need to be more ready from the start of the game and be tougher to play for a whole game. We can be on and off. When we’re on, we’re one of the best teams, but we got to be more consistent.”

This was the second of four straight games between the teams. They will play again in New Jersey on Thursday and meet on Saturday in Philadelphia.

NOTES: Undrafted Russian defenseman Egor Zamula made his NHL debut for the Flyers. ... Devils forward Andreas Johnson was hurt Sunday and missed his first game of the game with a lower-body injury. ... New Jersey was 1 for 25 on the power play during the skid before converting on its first two chances. ... New Jersey is 5-17-3 at home. ... Flyers rookie Jackson Cates picked up his first NHL point. ... Jack Hughes had two assists for the Devils.

New Jersey Devils defenseman Damon Severson (28) celebrates with New Jersey Devils left wing Miles Wood (44) after Wood scored a goal against the Philadelphia Flyers during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

New Jersey Devils defenseman Damon Severson (28) celebrates with New Jersey Devils left wing Miles Wood (44) after Wood scored a goal against the Philadelphia Flyers during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP_Sports

Philadelphia Flyers defenseman Philippe Myers (5) skates away as New Jersey Devils center Jack Hughes (86) congratulates teammate Pavel Zacha (37) after Zacha scored during the second period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. Devils center Nico Hischier (13) and left-wing Jesper Bratt (63) join the celebration. (AP PhotoKathy Willens)

Philadelphia Flyers defenseman Philippe Myers (5) skates away as New Jersey Devils center Jack Hughes (86) congratulates teammate Pavel Zacha (37) after Zacha scored during the second period of an NHL hockey game against the Philadelphia Flyers, Tuesday, April 27, 2021, in Newark, N.J. Devils center Nico Hischier (13) and left-wing Jesper Bratt (63) join the celebration. (AP PhotoKathy Willens)

Philadelphia Flyers center Sean Couturier (14) reacts as New Jersey Devils goaltender Mackenzie Blackwood (29) makes a save with New Jersey Devils defenseman Ryan Murray (22) and other Devils defenders during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

Philadelphia Flyers center Sean Couturier (14) reacts as New Jersey Devils goaltender Mackenzie Blackwood (29) makes a save with New Jersey Devils defenseman Ryan Murray (22) and other Devils defenders during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

The puck slips past Philadelphia Flyers goaltender Brian Elliott on a goal byNew Jersey Devils center Pavel Zacha during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

The puck slips past Philadelphia Flyers goaltender Brian Elliott on a goal byNew Jersey Devils center Pavel Zacha during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

A goal scored by Philadelphia Flyers left wing Oskar Lindblom goes in behind New Jersey Devils goaltender Mackenzie Blackwood, as Blackwood is upended on the play during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Flyers center Nolan Patrick (19) is in front of the crease along with a host of Devil defenders. (AP PhotoKathy Willens)

A goal scored by Philadelphia Flyers left wing Oskar Lindblom goes in behind New Jersey Devils goaltender Mackenzie Blackwood, as Blackwood is upended on the play during the second period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Flyers center Nolan Patrick (19) is in front of the crease along with a host of Devil defenders. (AP PhotoKathy Willens)

Philadelphia Flyers center Claude Giroux (28) watches his shot slide past the goal line behind New Jersey Devils goaltender Mackenzie Blackwood (29) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Devils center Pavel Zacha (37), defenseman Ryan Murray (22), and left-wing Jesper Bratt (63) all watch the shot. (AP PhotoKathy Willens)

Philadelphia Flyers center Claude Giroux (28) watches his shot slide past the goal line behind New Jersey Devils goaltender Mackenzie Blackwood (29) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. Devils center Pavel Zacha (37), defenseman Ryan Murray (22), and left-wing Jesper Bratt (63) all watch the shot. (AP PhotoKathy Willens)

New Jersey Devils goaltender Mackenzie Blackwood (29) winces as Philadelphia Flyers center Claude Giroux (28) scores a goal against him by flicking the puck over his left leg pad during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N. (AP PhotoKathy Willens)

New Jersey Devils goaltender Mackenzie Blackwood (29) winces as Philadelphia Flyers center Claude Giroux (28) scores a goal against him by flicking the puck over his left leg pad during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N. (AP PhotoKathy Willens)

New Jersey Devils defenseman Connor Carrick (5) celebrates his goal against Philadelphia Flyers goalie Philadelphia Flyers goaltender Brian Elliott (37) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)

New Jersey Devils defenseman Connor Carrick (5) celebrates his goal against Philadelphia Flyers goalie Philadelphia Flyers goaltender Brian Elliott (37) during the third period of an NHL hockey game, Tuesday, April 27, 2021, in Newark, N.J. (AP PhotoKathy Willens)