BOSTON -Simon Gagne and the Philadelphia Flyers put together one more dramatic comeback in a series full of rallies.

They got plenty of help from the Boston Bruins, who finished off another epic collapse with a familiar penalty.

Taking advantage of a too-many- men- on- the- ice penalty, Gagne scored on a power play with 7:08 left to give Philadelphia a 4-3 victory Friday night in Game 7 of the Eastern Conference semifinals.

The Flyers overcame a 3-0 series deficit and a 3-0 hole in the first period, rallying to advance to the conference finals against Montreal.

“It’s just a great feeling,” Scott Hartnell of the Flyers said. “All the adversity we had fought through, being down 3-0 in the series, 3-0 in the game, to come back and win, it’s absolutely incredible.”

It was humiliating for the Bruins, who will be remembered for their colossal collapse. They became the third team in NHL history to lose a series after winning the first three games.

“We got a little carried away from our game plan and lost our composure” in Game 7,” Bruins captain Zdeno Chara said.

When the final buzzer sounded, the Flyers poured off their bench and surrounded Michael Leighton, who held the Bruins scoreless in the last two periods after starting just his second playoff game for the injured Brian Boucher.

While the Flyers celebrated, the yellow towels used by fans to spur on the home team came floating to the ice, resting there as signs of frustration for a crowd that won’t need them until next season.

Bruins center Patrice Bergeron took a slap shot with one of those cold pieces of cloth. It didn’t go far.

The pivotal penalty was a throwback to 1979, when the Bruins were hurt by another call for too many on the ice against Montreal.

This one came with 8:50 left and Gagne, a major force since returning from a toe injury for Game 4, scored with 18 seconds left in the power play.

“I saw two centermen out there and I said, ‘What’s going on,’ ” said Milan Lucic, who had two goals for Boston. “I knew there was a miscommunication out there and we got caught.”

In Game 7 of the Stanley Cup semifinals 31 years earlier, the Bruins were called for having too many men on the ice, leading to Guy Lafleur’s tying goal with 1:14 left in the third period. Then Mario Tremblay won it at 9:33 of overtime, costing Boston a chance for the Stanley Cup and sending the Canadiens to the finals.

This time it was Gagne.

And now the seventh-seeded Flyers get to start the next round at home Sunday night against eighth-seeded Montreal.

“When that final buzzer went, it was a sigh of relief,” Philadelphia captain Mike Richards said.

The Flyers capitalized when Richards’ shot from the right circle hit players in front of Tuukka Rask. The puck bounced and Gagne, at Rask’s left, flipped the puck over the goalie’s right shoulder.

The only other teams to win a series after trailing 3-0 were the 1942 Toronto Maple Leafs, who beat Detroit, and the 1975 New York Islanders, who eliminated Pittsburgh. The other 159 teams that won the first three games in a series all won them.

The Bruins shot out to a 3-0 lead on power-play goals by Michael Ryder and Lucic, and another goal by Lucic. And only 14:10 had been played. Then James van Riemsdyk scored for Philadelphia with 2:48 left in the first period.

“It feels nice to finally get one after I don’t know how many games it’s been,” van Riemsdyk said.

That goal sparked the Flyers.

“We started relaxing and playing hockey, and feeling more comfortable on the ice,” Richards said.

Second-period goals by Hartnell at 2:49 and Danny Briere at 8:39 tied it.

Boston lost its third straight Game 7 and first since falling to Carolina in last year’s conference semifinals after rallying from a 3-1 series deficit.