PHILADELPHIA (AP) — Sebastian Aho had a hat trick, including the winning goal 28 seconds into overtime after Martin Necas tied it with 0.3 seconds left in regulation, and the Carolina Hurricanes rallied to beat the Philadelphia Flyers 5-4 on Saturday.

Brady Skjei also scored for the Hurricanes, and Frederick Andersen had 29 saves. Carolina held onto its lead in the Metropolitan Division after entering a point ahead of second-place New Jersey.

“We finally woke up,” Carolina coach Rod Brind’Amour said. “We were sleeping through the game for that third period and even the second period. We were just kind of going through the motions. Can’t do that in this league. So it was a good lesson.”

Tyson Foerster, Noah Cates and Brendan Lemieux each had a goal and an assist for the Flyers, and Joel Farabee also scored. Owen Tippett and Morgan Frost each had two assists for Philadelphia, which has dropped 11 of 15. The Flyers began play with the sixth-fewest points in the NHL. Felix Sandstrom finished with 29 saves.

“I thought we played really well,” Flyers coach John Tortorella said. “I thought we had the game controlled. I don’t know how to evaluate it right now.”

It looked like Philadelphia was headed to just its fifth winning streak of the season before Necas’ power-play tally. The Hurricanes went on the man-advantage with 7 seconds left in regulation when Scott Laughton was whistled for holding.

After Carolina won the draw, Shayne Gostisbehere fired a slap shot that was stopped by goalie Felix Sandstrom with a stellar left pad save. But the puck caromed toward the other side of the net, where a wide-open Necas fired it home.

“I was just standing on the back door and the puck just, I don’t even know, somehow showed up there and I just banged it into the net,” he said.

The Hurricanes celebrated wildly and then again when officials confirmed that the goal beat the end-of-game buzzer.

“The goalie made an unbelievable save, so you think the game’s over,” Brind’Amour said. “And then, you know, we got a lucky break there. I’ll take it.”

Aho didn’t waste much time to end the contest, deking past defenseman Tony DeAngelo before beating Sandstrom with his 30th goal of the season. Aho had been held without a point in seven straight games before recording his third career three-goal effort.

“I was able to gather a lot of speed and there was an offensive gap there so I just went for it,” Aho said. “You don’t really think about it too much when you’re out there. Just try to play with your instincts, and it worked this time.”

After Farabee tied it at 3-all 3:33 into the final period, Lemieux put the Flyers on top at 5:50. Frost made the play by blocking Andersen’s clearing attempt from behind the net, corralling the puck and sending it to Lemieux, who scored into a wide-open net with Andersen trying to recover.

Aho notched his second of the night with 6:05 left in the second on a wrist shot from the slot past Sandstrom’s glove. He opened the scoring with 5:08 left in the first on a wrist shot from close range that beat the goalie on the glove side.

NOTES: Carolina played its third game without third-leading scorer Andrei Svechnikov, who is out for the season with a knee injury. ... Philadelphia played the third contest of a seven-game homestand. ... Carolina swept the four-game season series against the Flyers, winning each game by one goal. ... The Hurricanes are 21-7-6 on the road while the Flyers dropped to 13-17-4 at home. ... Philadelphia is 2-11 in the second game of a back-to-back this season.

UP NEXT

Hurricanes: At the New York Rangers on Tuesday night.

Flyers: Host Florida on Tuesday night. ___ AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP_Sports