RALEIGH, N.C. (AP) — Zack MacEwen scored with 9:40 remaining and the Philadelphia Flyers rallied to beat the Carolina Hurricanes 2-1 on Friday night.

Joel Farabee also scored in the third period for the Flyers, who had been shut out in their previous game and couldn’t score in this one until the final period.

“We had a little different mindset heading into the third,” Farabee said. “We really wanted it, I think a little bit more.”

Carter Hart stopped 39 shots for the Flyers, who have won two of their past three games.

“They came out hard and we just had to battle and bear with it,” Hart said.

MacEwen’s goal was his first in 10 games this season. Former Carolina player Patrick Brown picked up one of the assists on the play.

Steven Lorentz scored for the Hurricanes, off to a franchise-best start to the season. They lost for just the second time in 12 games.

“I think we did it to ourselves,” Lorentz said. “It’s too bad. We did play a really, really solid first 40 minutes. It’s too bad that in the third period they kind of beat us at our own game.”

Carolina goalie Frederik Andersen made 26 saves.

Hart, though, was the standout down the stretch as he thwarted several Carolina scoring chances.

“I’m not going to apologize for great goaltending,” Flyers coach Alain Vigneault said. “It was fun to watch.”

The Hurricanes lost for the first time in six home games this season.

Hurricanes coach Rod Brind’Amour said the first two periods were among the team’s best of the season — to a degree. They held a 28-13 edge in shots through two periods.

“We just didn’t get enough out of the periods,” Brind’Amour said. “We didn’t do enough the first two periods to allow to have a little wiggle room.”

Lorentz batted in the puck baseball-style from the right side of the net on the rebound of a shot from Jesper Fast.

“I just kind of took a swing at it,” Lorentz said.

With two goals, Lorentz has matched his total from last season when he played in 45 games as a rookie.

Andersen has allowed two or fewer goals in eight of 11 outings this season. He was aiming to become the ninth goaltender in NHL history to post at least 10 wins in his team’s first 12 games of a season.

PLUGGING AWAY

The Flyers have gone four games in a row without scoring more than two goals, but they’ve won two of those games.

“Keep doing the little things right. It will all work out in the end,” Farabee said.

Entering the third period, the Flyers were in danger of back-to-back shutouts. Philadelphia had only 13 shots on goal through two periods, but posted 15 in the third.

There were some line adjustments made by the Flyers in the third period.

“I liked our 5-on-5 play in both (the first two) periods, but we hadn’t finished in a while,” Vigneault said. “Sometimes you’ve just got to tweak it a little bit and that’s what we did.”

A NEW LOOK

The Hurricanes went the first couple of weeks of the season with barely making a lineup change. But as the season wears on, the need for adjustments has been evident.

Center Martin Necas missed his first game of the season Friday because of illness. That gave Josh Leivo a chance to make his Carolina debut, appearing in his 208th NHL game.

UP NEXT

Flyers: Saturday night at Dallas.

Hurricanes: Saturday night at home vs. St. Louis.

___

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