It started as one of the Flyers' worst performances of the season.

It ended as the greatest late-game comeback in the franchise's history.

Sparked by Scott Hartnell's fourth career hat-trick, the Flyers overcame a four-goal third-period deficit last night and stunned the Carolina Hurricanes, 6-5, in a shoot-out before a roaring crowd at the Wachovia Center.

It equaled the greatest comeback win in the Flyers' history. They also overcame a four-goal deficit in an 11-6 win in Detroit in 1988. But in that game - which included two goals each by Murray Craven and Mark Howe and a tally by current assistant Craig Berube - the Flyers had trimmed a 5-1 deficit to 6-4 heading into the final period.

Simon Gagne, who scored the tying goal with 1 minute, 44 seconds left in regulation, and Mike Richards each scored in the shoot-out. Backup goalie Antero Niittymaki stopped the first two shoot-out shots, including the second one by former Flyer Rod Brind'Amour, to secure a win for the ages.

At the start of the third period, there were no such indications that a comeback was in the works as the Flyers were in a 5-1 hole.

"I think, collectively, we came together" after the second period, said Scotty Upshall, who brought the Flyers to within 5-4 with a rebound goal (against a stickless goalie) with 4:52 left in regulation. "We threw everything at them. We played pretty much Flyer hockey, the way we know how. We shot the puck, we made simple plays and we won battles, and that was the big difference."

For two periods, the best part of the game, from the fans' perspective, was that they were going to win free tickets to a Phantoms game because more than 20,000 hot dogs were in the process of being consumed on Dollar Dog Night.

"We came in and he basically said, 'You're playing like a bunch of pansies,' " Hartnell said of coach John Stevens' rant between the second and third periods. "We were turning it over and basically playing losing hockey . . . and then we turned it on for 20 minutes."

"It makes the coach old quick," Stevens said about the frenzied developments. "I love the fact that we don't go away. We talked between the second and third periods . . . and I thought the guys came out and responded with a great effort and showed the character of our hockey team."

Niittymaki made several big stops on a power play (after a too-many-men-on-the-ice penalty against the Flyers) toward the end of overtime. The goalie also made a key save on a two-on-one shot by Ryan Bayda in a shorthanded situation with about three minutes left in regulation.

Stevens was asked if he was tempted to remove Niittymaki after two struggling periods.

"Well, they scored a five-on-three goal and there were clearly some breakdowns around him, and [I] certainly wasn't pointing the finger at him. . . . We just thought we'd stay with it. He, amongst others, came up with big plays as the game went on."

On the goal that tied the score at 5, Gagne took a slick pass from Mike Knuble from behind the net. Gagne knocked in his own rebound.

The Flyers faced the Hurricanes for the fourth time in their last eight games, and by the end of the night, it was clear these two teams are sick of each other.

Fights. Chippy play. More fights.

For a while, that defined the night.

And then Hartnell scored his first hat trick since January - and the Flyers made a remarkable comeback and overcame a questionable double-minor on Andrew Alberts, along with two Carolina power-play goals.

Niittymaki, who had a 1.60 goals-against average in his previous five games, endured a rough first two periods. Five of Carolina's first 17 shots were goals.

"In the second period . . . it didn't matter what I tried to do; the rebounds went straight back to them and everything went in," Niittymaki said. "Then, I got a couple of saves after that, and we came out so hard in the third period and everybody kind of got fired up."

Especially the hot-dog-eating fans.

Contact staff writer Sam Carchidi at 215-854-5181 or scarchidi@phillynews.com.