PHILADELPHIA - Jeff Carter scored three goals, Danny Briere had a goal and three assists, and the Philadelphia Flyers beat the Toronto Maple Leafs 8-5 on Friday night.

Simon Gagne, Randy Jones, Claude Giroux and Scott Hartnell also had goals for the Flyers, who passed Carolina for fourth place in the Eastern Conference. The top four teams get home-ice advantage in the first round of the playoffs.

Carter's first career hat trick gave him 44 goals. Only Washington's Alex Ovechkin has more this season.

Luke Schenn, Boyd Devereaux and Mikhail Grabovski scored for the Leafs in the last four minutes of the second period to cut a 6-0 deficit in half. Nikolai Kulemin and Jamal Mayers also had goals for Toronto.

Five players scored in the first period as the Flyers made sure they didn't lose consecutive games to Toronto, which isn't going to the playoffs for the fourth straight year. The Leafs won the first game of the home-and-home series 3-2 Wednesday night.

The Flyers scored three times in a span of 4:38 to take a 3-0 lead. Jones got the first one on a backhander after the rebound from Briere's shot kicked right to him inside the left circle.

Briere helped set up the next goal by speeding up ice and sending a perfect crossing pass to the streaking Arron Asham, who quickly pushed the puck to Giroux. The rookie forward deked goalie Martin Gerber with a nifty fake and scored his eighth goal.

Gagne scored his 32nd goal on a power play, firing a slap shot from the slot through a screen.

That was it for Gerber. He was replaced by Curtis Joseph after allowing three goals on nine shots. Joseph wasn't much better. He gave up two goals on five shots and returned to the bench for the start of the second period.

Hartnell made it 4-0 with his 30th goal later in the first. Carter scored on a breakaway 1:27 after that.

With the son of one of the notorious Hanson brothers from the movie "Slap Shot" making his NHL debut, this briefly turned into a boxing match. Two fights broke out in the final minute of the first period, but the fisticuffs didn't carry over.

Christian Hanson, the son of Dave from movie fame, played his first game for the Leafs after signing a two-year deal on Tuesday. His father sat in the stands and drew loud applause when he was introduced in the third period.

Schenn's wrist shot from just inside the blue-line started Toronto's comeback attempt. Devereaux scored on a one-timer 97 seconds later. Grabovski got a long rebound and slapped it past Martin Biron to cut the deficit in half.

But Carter scored early in the third and the Leafs couldn't get within two goals.

Notes: The five goals in the first were a season high in a period for the Flyers, and their eight goals were a season best. ... The teams met for the 150th time in the regular season. The Flyers are 78-48-24. ... Giroux has a goal in three straight games.