RALEIGH, N.C. — Well, that was surely needed.

The Flyers, losers of seven of their previous eight games, took what they hope was a step toward securing a playoff spot Saturday night as they rallied past Carolina, 4-2, at the PNC Arena.

Blanked for most of the game, the Flyers erupted for three late goals and stayed in third place in the Metropolitan Division. If they lost, they would have slipped into the second wild-card spot.

Val Filppula, capitalizing on a pass from Wayne Simmonds — and benefiting from a collision with referee Francois St. Laurent — scored on a breakaway with 5 minutes, 49 seconds remaining to give the Flyers a 3-2 lead. It was his first goal in 26 games.

Filppula was unable to get into the defensive zone because of the collision and ended up being sent away on the breakaway.

"The ref took me out," Filppula kidded. "I don't think he meant to do that, but I was so late behind the play [because of it] and it turned out good this time."

Michael Raffl snapped a 16-game goalless streak and iced the win with an empty-net score, giving the Flyers four goals in the final 11:41.

"Maybe the last game, the first period wasn't where we wanted it to be," Filppula said about a 5-3 loss to Columbus, "but other than that, we've been playing well and creating chances. Every game has been pretty close, but we've been losing games. This should give us a lot of confidence."

The Flyers have a key game Sunday against first-place Washington, which is six points ahead of Philadelphia and has a game in hand, at the Wells Fargo Center.

Earlier, Travis Konecny got behind the Carolina defenseman Noah Hanifin and tipped in Travis Sanheim's point drive with 11:41 left in regulation to tie the score at 1-1. It was Konecny's 19th goal and fourth in the last nine games — and it came on just the Flyers' second shot of the third period.

"The guys have been giving me a hard time about going to the net," said Konecny, smiling. "I've been watching video and trying to get to the net a little more."

The tie was short-lived. Defenseman Jaccob Slavin skated around Raffl and put a left-circle shot past Alex Lyon on the short side, giving Carolina a 2-1 lead with 9:56 left.

A little less than two minutes after Slavin's goal, Jake Voracek scored on a pretty forehand-to-backhand move from in front, knotting the score at 2-2 with 8:02 remaining.

It was the first career point in 13 games for Oskar Lindblom, who set up the goal with a slick pass from the corner.

"It felt good; it was an important goal and we needed it, so it was good timing," a relieved Lindblom said.

Coach Dave Hakstol didn't have a morning skate because he wanted his team to conserve energy. He also changed three of his lines, but the Flyers offense was stale until the latter stages.

Lyon (23 saves) played brilliantly and improved to 3-2.

"Every time he plays he stands on his head for us," Konecny said. "He's definitely earned his spot playing on our team."

"I'm just trying to do what I've done my whole life — go in and be consistent," Lyon said.

Carolina,which blew a 4-1 third-period lead in a 6-3 loss to Boston in its previous game, turned an innocent-looking play into the game's first goal.

Jordan Staal deflected Slavin's point drive through the legs of Lyon with  4:48 left in the first.

A minute later, Lyon made a pair of point-blank saves on Hanifin, and he also made a tough stop on Derek Ryan with 2:45 remaining to keep the Flyers within 1-0.

"I was really impressed with his play," Hakstol said.

Carolina had allowed six goals in three of its previous four games, but the Flyers – who again over-passed to a fault — could not solve Ward in the first two periods.

But they made up for it by scoring three times in a  5:52 span in the final period.

"It's an important two points, but I guess just as importantly, I thought it was a really hardworking, start-to-finish win for us," Hakstol said.

Breakaways

Michael Raffl was moved to wing on the top line, and Konecny was dropped to the third line. Needing offense, Hakstol moved Konecny back to the top line in the third period. … After being a healthy scratch for four games, Jordan Weal returned to the lineup and played on the third line. Jori Lehtera was out of the lineup for the first time since Jan. 4. … Robert Hagg (lower-body injury) took part in pregame warm-ups and may be able to return Sunday. Hakstol said he was leaning toward using Petr Mrazek against the Capitals. … The Flyers have 19 road wins for the first time in six seasons.