SUNRISE, Fla. -- The Philadelphia Flyers scored four second-period goals Tuesday to clinch their return to the Stanley Cup Playoffs.

Claude Giroux scored two of those four goals in a 5-2 victory against the Florida Panthers at BB&T Center.

"Well, it's great," Flyers coach Craig Berube said. "I told the guys, 'You should be proud of yourselves.' I mean, they went through a lot and they battled hard all year. They're a good group of guys, good character, and they deserve a lot of credit for making the playoffs."

The Flyers (41-29-9) remain two points behind the New York Rangers, who defeated the Carolina Hurricanes 4-1, for second place in the Metropolitan Division and home-ice advantage in the Eastern Conference First Round.

Philadelphia is in the playoffs after a one-year absence and a 1-7-0 start to this season.

"Obviously last year not making the playoffs, in Philadelphia it's not acceptable," Giroux said. "We're aware of that. For us to be able to be in the playoffs this year, especially with the start we had, we've got to be proud of ourselves. We've got to make sure that we keep playing like that."

Goalie Steve Mason made 38 saves; he is 6-1-0 lifetime against Florida.

Leading 4-0, the Flyers were outshot 16-3 in the third period.

"Our third period was terrible," Mason said. "We all know it and we addressed it after the game. And it's something that come playoff time we're going to have to be better with."

Goaltender Roberto Luongo was a late scratch for the Panthers because of an upper-body injury; Dan Ellis made 22 saves in the emergency start. It was the fourth time in five starts with the Panthers that Ellis, acquired in a trade with the Dallas Stars on March 5, allowed at least five goals.

"In the second period I just let in four [bad] goals," Ellis said. "It's unacceptable, it's frustrating as [heck]. You're one of the primary reasons for the loss. I take responsibility for that loss. I can't let … two pucks go right through me. I need to be able to find a way to carry that momentum from the first period through the rest of the game with the same focus and I didn't do it. It's ridiculous."

Panthers coach Peter Horachek said Luongo's injury isn't serious and he could have played had the team been in playoff contention.

Luongo started the previous two games after missing three games with a mild concussion he sustained against the Carolina Hurricanes on March 27, but Horachek said the injury that kept him out against the Flyers was muscular.

Erik Gudbranson and Jonathan Huberdeau scored in the third period for the Panthers (28-44-8), who lost for the ninth time in 11 games.

Huberdeau, back after missing 11 games because of a concussion, snapped a 19-game goal drought. His goal was his first since Jan. 20.

Giroux had his fourth two-goal game of the season, his third since March 2. Lecavalier became the seventh Flyers player to reach 20 goals this season.

Giroux was reminded of his prediction after the poor start, which included coach Peter Laviolette being fired, that the Flyers would make the playoffs.

"It was only eight games," Giroux said. "We had to believe in ourselves and when we started believing in how good we were, we started winning more games. It's great to be in the playoffs.

"I just believed that we had a good team. We have four lines rolling. We have eight [defensemen] that can play a lot of minutes, and then we have two good goaltenders. Just the way we're playing, we need to still get better before the playoffs and we only [have] three games to do it. We need to make sure we play better."

Philadelphia snapped a three-game road losing streak, winning away from home for the first time since March 16. The Flyers play their next two on the road, against the Tampa Bay Lightning on Thursday and the Pittsburgh Penguins on Saturday before ending the season at home against Carolina.

After a scoreless first period during which the Flyers had a stretch of 4:40 of power-play time, including 1:40 with a 5-on-3, Lecavalier opened the scoring at 2:02 of the second.

The goal came after Florida defenseman Colby Robak almost whiffed on a pass from behind his net and the puck slid out front. Ellis stopped Hall's stuff attempt, but the rebound found its way to Lecavalier in the slot and he put it home through the five-hole.

Giroux scored twice in a span of 2:21 to make it 3-0.

His first goal came on a wrist shot from the right circle that beat Ellis low to the far side. The second was a one-timer from the slot off a backhand cross-ice feed from Mark Streit, giving him 27 this season.

"Just a couple of shots where I was able to get open and shoot it on net," Giroux said. "Obviously those goals were huge for us to get the lead."

Couturier closed the second-period scoring after Braydon Coburn's slap shot from the point was blocked by Florida center Nick Bjugstad and bounced to the side, where Couturier one-timed it into an open net. It was Couturier's first goal since March 1, a span of 18 games.

The Panthers scored twice in the first 5:38 of the third period.

Gudbranson scored at 1:14 when his wrist shot from the blue line went off a Flyers player. Huberdeau made it 4-2 when he got by Streit at the Flyers blue line by pushing the puck forward with his backhand before beating Mason with a shot along the ice.

"The last seven or eight minutes we played some pretty good hockey," Lecavalier said. "There might have been a little letdown, but at the same time overall we played a good game. The first period from both sides wasn't that great, but we came out in the second and we scored four goals and we had a lot of good chances offensively. We played in their zone a lot and it paid off.

"It's nice [to clinch]. We want to finish the right way, but I think we accomplished, after the start we got, we've got to be proud of what we've done. Obviously we have to finish strong and make sure that we're ready and confident for that first round."