RALEIGH, N.C. — For the goal-starved Flyers, facing the league’s best defensive team, the Carolina Hurricanes, did not seem like the best way to get out of a scoring slump Friday night.

“It’s a good opportunity for us to continue to show we’re a good team,” Flyers coach Alain Vigneault said before the game.

Opportunity seized. Somehow.

Despite being thoroughly outplayed and outshot in the first two periods, the Flyers ended a long scoring drought and got third-period goals from Joel Farabee and fourth-line winger Zack MacEwen to stun the Hurricanes, 2-1, at PNC Arena.

The Flyers, now 7-3-2, avoided their first two-game losing streak of the season as Carter Hart made 39 saves and stole the victory. They handed Carolina (10-2) its first home loss after five wins.

“Oh, man, he played a great game,” MacEwen said after his first goal as a Flyer turned out to be the winner. “He made some huge stops for us. I can’t say enough about Hartsy.”

“Just trying to do my job, stop pucks, and have fun,” said Hart, who praised Claude Giroux and Ivan Provorov for making key blocks.

MacEwen redirected Justin Braun’s point shot past Frederik Andersen to give the Flyers a 2-1 lead with 9:40 remaining. About two minutes later, with Carolina on a power play, Hart robbed Vincent Trocheck from the doorstep.

“They’re one of the most skilled teams in the league, and their coach has them playing a real tight-checking game,” Vigneault said about the Hurricanes. “You combine that with the speed and the skill they have, and it makes them a real good team — and they’ve had solid goaltending from Day 1.”

Andersen wasn’t severely tested until the third period.

Hart was the only reason the Flyers faced just a 1-0 deficit heading into the third period. He stopped 27 of 28 shots, with Steven Lorentz scoring midway through the second when he batted a puck out of midair. Just 45 seconds later, Seth Jarvis also found the net, but the Flyers successfully challenged that the play was offside, so the goal was erased.

Vigneault switched his lines at the start of the third period to try to wake up the offense. It worked. Farabee, moved to a line with Scott Laughton and Travis Konecny, tied it at 1-1 with 15:54 left.

Laughton cleverly put a pass off the end boards, and Farabee raced ahead of the defense, collected the puck and beat Anderson, ending his eight-game goalless streak. He also snapped the Flyers’ goalless streak, which had reached 128:22.

“Laughtsy made just a great play; it just shows how good his hockey IQ is,” Farabee said.

The Flyers had nine of the first 10 shots in the third and seemed re-energized by Vigneault’s lineup moves, one that had James van Riemsdyk replace Konency on the top line.

”We hadn’t finished in a while,” Vigneault said about his third-period line changes, triggered by the first 40 minutes, when the Flyers were outshot, 28-13. “Sometimes, you just have to tweak it a bit. Fortunately, tonight it paid off.”

MacEwen finished plus-2 in 10:06.

“Our fourth line is always giving 100%,” Vigneault said of McEwen’s goal. “It’s great to see them rewarded for their hard work and it ended up being the winning goal.”

Before their rally, the Flyers offense had grown stagnant. Example: They had just two shots by their forwards in Friday’s first period. Another example: They entered the third period without a goal in their last 124:16.

Excluding an empty-net tally, they began the night with just eight goals over the last six games.

The hope is that when center Kevin Hayes returns, possibly as early as Saturday in Dallas, he will give the lines more balance. When Hayes returns, Derick Brassard may eventually drop to the third line, and Laughton could be placed on the fourth unit.

But, remember, Hayes did not participate in training camp and it could take him a while to get in the flow — and he may not be on the second line right away.

Power-less play

The Flyers’ power play has been awful the last eight games, and even some tweaks to the units didn’t do much Friday.

The Flyers were 0-for-3 on the power play in the opening period, making them 2-for-24 since Oct. 27. While on a 65-second five-on-three late in the first, they had just one shot and allowed Carolina to dominate the faceoff circle and have three clears.

They were fortunate to not allow a shorthanded goal when Jordan Staal came out of the penalty box to make it a five-on-four and went in on a breakaway, which Hart denied.

“It sounds like a cliche, but we just have to move our feet more,” said Flyers forward Patrick Brown, a former Hurricane.

The Flyers finished 0-for-5 on the power play and are in a 2-for-26 rut. Clearly, assistant coach Michel Therrien, who runs the power play, needs to change the system. In fact, Hart made two huge point-blank saves late in the game while the Flyers had an extra attacker.

The Flyers’ penalty kill, led by Hart, was 5-for-5.

Up next

The Flyers play in Dallas (4-6-2) on Saturday night and defenseman Ryan Ellis, who has missed the last nine games with an unspecified lower-body injury, is expected to return to the lineup. There’s also a chance Hayes plays for the first time this season after rehabbing from abdominal surgery.

Both players skated Friday in Raleigh and “did well,” Vigneault said. “He said it would be a game-time decision in Dallas, and that Ellis was “more probable” than Hayes.

Dallas, which hasn’t played since Wednesday, has just one win in its last seven games (1-4-2) and has yet to register a regulation victory this season. The Stars have three wins in overtime and another in a shootout.