TORONTO -- Zach Hyman scored his first of two goals with 1:50 remaining in the third period, and the Toronto Maple Leafs completed a three-goal comeback to defeat the Montreal Canadiens 6-3 at Scotiabank Arena on Saturday.
Hyman put in a rebound at the side of the goal crease from Mitchell Marner's shot to give the Maple Leafs a 4-3 lead.
William Nylander and Auston Matthews each had a goal and an assist, Tyler Ennis and Andreas Johnsson scored, and Frederik Andersen made 32 saves for Toronto (37-20-4), which ended a three-game losing streak.
"The way that we won the game coming from behind, it's awesome," Hyman said. "It's a good feeling. To be able to score that goal, to get the lead after being down 3-0, is pretty cool. What a win for us to end a losing streak, coming back like we did on a Saturday night against Montreal, it's a good feeling."
[WATCH: All Canadiens vs. Maple Leafs highlights]
The victory moved the Maple Leafs within three points of the Boston Bruins for second place in the Atlantic Division.
"It's a good win for our team," Toronto coach Mike Babcock said. "When it's 3-0 and they've got to turn the music on loud because they're scared what the fans will say, it's not a good feeling. I thought we were really prepared, but it goes to show you when you're young and it's a big game, you get a little off kilter sometimes when you shouldn't. Just steady on the rudder and get it done."
Andrew Shaw and Jeff Petry each had a goal and an assist, Tomas Tatar scored, and Carey Price made 31 saves for Montreal (33-22-7), which holds the first wild card into the Stanley Cup Playoffs from the Eastern Conference.
"We've been through enough adversity as a group; we should understand how to handle it but tonight we failed," Canadiens forward Brendan Gallagher said. "We didn't do a good enough job. You get up 3-0, you should come away with a win.
"But like anything we've been through, the only choice we have to really learn from this and make sure it doesn't happen again because it's a pretty [lousy] feeling."
Video: Dunkin' NHL Comebacks: Maple Leafs explode for six
The Canadiens took a 1-0 lead at 8:07 of the first period when Shaw put in a rebound from Brett Kulak's shot at the top of the goal crease.
Tatar made it 2-0 at 12:44 with a shot from the right face-off circle.
Petry's power-play goal gave the Canadiens a 3-0 lead at 13:52.
Matthews started Toronto's rally when he scored at 2:13 of the second period for a power-play goal to make it 3-1.
Ennis made it 3-2 with a power-play goal of his own at 18:06.
"We know that their power play is good, and I think we gave them too many opportunities on the power play obviously because they capitalized," Canadiens captain Shea Weber said. "They're good; you never want to give up goals on the penalty kill. They're tops in the League for a reason. I know they struggled for a little bit, but they've got a lot of talent and guys who can make plays."
Video: MTL@TOR: Nylander ties game off fortuitous bounce
Nylander tied it 3-3 at 6:58 of the third period when Patrick Marleau shot it into the zone from center ice and the puck bounded off the boards into the slot, catching Price out of position.
Johnsson (19:02) and Hyman (19:37) scored empty-net goals for the 6-3 final.
"We definitely had a great first period, but at the end of the day we might have got a little sloppy with the puck," Price said. "We made a few bad decisions, and that ultimately what usually costs you the game."
They said it
"We tightened up. We froze even in the third period when we had a one-goal lead. It's a matter of going out and playing on our toes like we did at the start of the game. We couldn't even make a play; I don't know why, but we need to learn to manage these situations much better than we have." -- Canadiens coach Claude Julien
"It's really fun to be a part of. You don't see too many friendships on the ice and you definitely like to beat them on a night like this. I feel like every time we play them, it goes to the next level, especially this year [when] for the first time in a while, both teams have been competitive." -- Maple Leafs goalie Frederik Andersen
Need to know
The Canadiens were without forward Jonathan Drouin, who was a late scratch because of the flu. … Marleau played in his 1,636th NHL game, passing Scott Stevens for eighth on the all-time games played list. … Andersen won his 99th game with the Maple Leafs, moving him past John Ross Roach for eighth place on their all-time wins list for goalies. … Toronto rallied back from three or more goals to defeat Montreal in a regular-season game for the second time in Maple Leafs history and first since March 26, 1969.
Canadiens: At the New Jersey Devils on Monday (7 p.m. ET; MSG+, TSN2, RDS, NHL.TV)
Maple Leafs: Host the Buffalo Sabres on Monday (7 p.m. ET; TVAS, TSN4, MSG-B, NHL.TV)
Video: Leafs rally for six straight goals to down Habs, 6-3