Auston Matthews scored twice in the third period as the Toronto Maple Leafs rallied from a three-goal deficit and held on to beat the Philadelphia Flyers 7-6 Friday night.

Jake Muzzin had two goals and an assist, and Patrick Marleau, Zach Hyman and Martin Marincin also scored to for the Maple Leafs, who had five consecutive goals to take the lead after trailing 5-2. Toronto snapped a two-game skid and pulled two points behind Boston for second place in the Atlantic Division.

William Nylander, Nazem Kadri, Nikita Zaitsev and Ron Hainsey each had two assists for the Maple Leafs, and Frederik Anderson finished with 23 saves.

Toronto Maple Leafs center Auston Matthews (34) celebrates with teammates after scoring the go-ahead goal on Philadelphia Flyers goaltender Brian Elliott during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP
Toronto Maple Leafs center Auston Matthews (34) celebrates with teammates after scoring the go-ahead goal on Philadelphia Flyers goaltender Brian Elliott during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP

James van Riemsdyk scored three goals, Shayne Gostisbehere and Radko Gudas each had a goal and an assist, and Jakub Voracek also scored for the Flyers. Nolan Patrick and Sean Couturier each had two assists and Brian Elliott had 44 saves. Philadelphia has lost two straight after a 6-1-1 stretch.

Matthews got the tiebreaking goal with 5 minutes left, taking a one-handed pass from Nylander in front and burying it past Elliott. He then added his 34th of the season with 2:39 remaining off a rebound on a rush to put the Maple Leafs up 7-5.

Muzzin completed his hat trick on a tip with 1:14 left for his 24th to pull the Flyers within one.

Toronto Maple Leafs goaltender Frederik Andersen (31) tries to cover the puck as Philadelphia Flyers centre Nolan Patrick (19) looks for a rebound during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs goaltender Frederik Andersen (31) tries to cover the puck as Philadelphia Flyers centre Nolan Patrick (19) looks for a rebound during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

Coming off consecutive brutal home-ice performances — Monday’s 6-2 loss to Tampa Bay Lightning and Wednesday’s 5-4 loss to Chicago Blackhawks, when they trailed 5-0 late in the second period before a late rally — the Leafs fell behind 5-2 on Friday before two goals from Muzzin set up Marincin’s tying score early in the third.

Marincin, who hadn’t scored since Nov. 11, 2016, fired a shot from the point that went off the glove of Flyers defenseman Robert Hagg and in past Elliott at 2:55.

Andersen nearly bobbled the puck into his own net later in the period on a clearing attempt during a Maple Leafs power play, but managed to recover in time.

Toronto Maple Leafs center Auston Matthews (34) celebrates his goal against Philadelphia Flyers goaltender Brian Elliott during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs center Auston Matthews (34) celebrates his goal against Philadelphia Flyers goaltender Brian Elliott during the third period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

Toronto nearly went ahead with under nine minutes to go, but Elliott stopped Andreas Johnsson on the doorstep.

Tied 1-1 after the first, the Flyers went ahead at 1:15 of the second when van Riemsdyk tipped his 22nd past Andersen. The forward, who spent six seasons in Toronto before returning to the team that drafted him as a free agent last summer, made it 3-1 when Claude Giroux threw a puck in front that van Riemsdyk got a stick to before it dribbled through Andersen at 8:26.

Hyman, who returned to the lineup after a one-game absence because of the flu, scored his 17th on a slick setup by Mitch Marner just 61 seconds later to get Toronto back within one, but Gudas restored the Flyers’ two-goal lead with his third of the campaign and first in 37 games.

Philadelphia Flyers goaltender Brian Elliott reaches for the puck during the second period against the Toronto Maple Leafs in an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers goaltender Brian Elliott reaches for the puck during the second period against the Toronto Maple Leafs in an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

Gostisbehere then made it 5-2 less than a minute later when he swept home his seventh after a scramble in front.

The Flyers got on the board first as Voracek, back after missing two games due to a suspension for a hit on Islanders defenseman Johnny Boychuk last Saturday, scored on a one-timer off Patrick’s faceoff for his 19th with 7:38 left in the first.

Toronto tied it at with 2:15 left in the period on the power play when Nylander’s shot went off Marleau for his 15th, and first in eight games.

Toronto Maple Leafs left wing Zach Hyman (11) celebrates his goal with teammates Mitchell Marner (16) and Ron Hainsey (2) during the second period of an NHL hockey game against the Philadelphia Flyers on Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs left wing Zach Hyman (11) celebrates his goal with teammates Mitchell Marner (16) and Ron Hainsey (2) during the second period of an NHL hockey game against the Philadelphia Flyers on Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

NOTES: The Maple Leafs wore their throwback green and white Toronto St. Patricks jerseys. The Maple Leafs were known as the St. Patricks from 1919 until 1927 when the team was bought by Conn Smythe, who changed the name. Toronto will also wear green and white on Saturday at Ottawa. .,, Voracek has 12 points in his last six games (three goals, nine assists). … The Flyers, who lost 5-2 at home to Washington on Thursday dressed 11 forwards and seven defensemen with winger Ryan Hartman out with an illness. … Hyman returned to the lineup, but Toronto was still minus F Kasperi Kapanen (concussion), D Jake Gardiner (back) and D Travis Dermott (shoulder).

UP NEXT:

Flyers: At Pittsburgh on Sunday.

Philadelphia Flyers goaltender Brian Elliott makes a save against the Toronto Maple Leafs during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers goaltender Brian Elliott makes a save against the Toronto Maple Leafs during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

Maple Leafs: At Ottawa on Saturday night.

___

Toronto Maple Leafs center Auston Matthews (34) tries to control a bouncing puck in front of Philadelphia Flyers goaltender Brian Elliott (37) during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs center Auston Matthews (34) tries to control a bouncing puck in front of Philadelphia Flyers goaltender Brian Elliott (37) during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers center Sean Couturier (14) reacts after teammate James van Riemsdyk (25) scored on Toronto Maple Leafs goaltender Frederik Andersen (31) during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers center Sean Couturier (14) reacts after teammate James van Riemsdyk (25) scored on Toronto Maple Leafs goaltender Frederik Andersen (31) during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs center Auston Matthews (34) carries the puck up ice against the Philadelphia Flyers during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)n
Toronto Maple Leafs center Auston Matthews (34) carries the puck up ice against the Philadelphia Flyers during the second period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)n
Philadelphia Flyers left wing James van Riemsdyk (25) is congratulated for his second-period goal against the Toronto Maple Leafs in an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers left wing James van Riemsdyk (25) is congratulated for his second-period goal against the Toronto Maple Leafs in an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers goaltender Brian Elliott (37) makes a save on the Toronto Maple Leafs during the first period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Philadelphia Flyers goaltender Brian Elliott (37) makes a save on the Toronto Maple Leafs during the first period of an NHL hockey game Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs center Patrick Marleau (12) celebrates his goal with teammate Andreas Johnsson (18) during the first period of an NHL hockey game against the Philadelphia Flyers on Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)
Toronto Maple Leafs center Patrick Marleau (12) celebrates his goal with teammate Andreas Johnsson (18) during the first period of an NHL hockey game against the Philadelphia Flyers on Friday, March 15, 2019, in Toronto. (Frank Gunn/The Canadian Press via AP)

Featured Video