TORONTO (AP) -- Rasmus Sandin joked early in the day that Maple Leafs head coach Sheldon Keefe asked him to score 10 goals in his return to the NHL.
Auston Matthews took care of the scoring with a hat trick, and Sandin, a 19-year-old defenseman who starred for Sweden at the recent world junior hockey championship, did just fine in plugging a hole on Toronto's injury-hit blue line, assisting on two goals in a 7-4 victory Tuesday night over the New Jersey Devils.
''I feel confident,'' Sandin said. ''The group is really good and helps me in every way they can.''
Sandin was a key contributor in a quick-strike first period before Matthews scored three times to snap a hat-trick hex. He hadn't scored three goals in a game since his NHL debut in October 2016, a span of 257 regular-season games.
''I mean, I figured I'd get one sometime,'' he said.
Sandin was recalled from the American Hockey League after Toronto lost top defenseman Morgan Rielly to a broken foot. The club's first-round pick in 2018, Sandin made his NHL debut Oct. 2 and had two assists in six games before getting sent down to the minors.
After registering three goals and 10 points to help his country win bronze at the under-20 tournament in the Czech Republic, and three assists in two AHL games over the weekend, he put on a show in his return.
''He's fun to watch,'' Matthews said. ''He made an immediate impact.''
John Tavares added a goal and two assists for Toronto, while William Nylander and Zach Hyman, both with two-point nights, and Frederik Gauthier provided the rest of the offense for Leafs (25-16-6), who snapped a three-game winless streak.
Frederik Andersen made 24 saves for the Leafs after getting pulled in two of his team's last three outings.
Matthews, who came in with eight two-goal contests this season, hadn't scored three since his four-goal outburst in his first NHL game. Linemate Mitch Marner, who assisted on two of the goals, found a bit of humor in Matthews' unusual streak.
''It's pretty funny,'' Marner said. ''We've actually talked about it a couple times ... I'm sure that's a big relief.''
Blake Coleman, with his first-career hat trick, and P.K. Subban scored for New Jersey (17-22-7).
Louis Domingue allowed five goals on 19 shots before getting yanked midway through the second. Cory Schneider, who was only just summoned from the AHL, came on in relief and finished with 13 saves. Will Butcher had three assists.
''We didn't start on time,'' Coleman said. ''We owe Louis a game. That was inexcusable.''
What also allowed the Leafs to exhale was a decent defensive performance, save for stretches of the second period and a semi meltdown late that allowed the Devils to make the score more respectable,
''We controlled the puck well,'' Marner said. ''We got away from it a little bit in the second.''
Sandin stepped up early, providing the point shot that Tavares tipped home for his 18th goal of the season at 5:18 of the first.
Toronto made it 2-0 at 9:10 after Jason Spezza won a battle behind New Jersey's net. The puck eventually found its way to Gauthier, and he wheeled in front before firing in his sixth.
The Leafs then connected on their second power play of the evening in the dying seconds of the period when Hyman tipped in his 12th off another point shot from Sandin as he was being cross-checked in front.
''The biggest thing about (Sandin's) game is his poise,'' Keefe said. ''He has that in spades.''
Nylander got in on the action 2:12 into the second with his 20th to snap a four-game goal drought.
Andersen made a nice stop on a New Jersey power play later in the period before Coleman muscled his way through score at 6:56.
Toronto, which had given up 17 goals against over a troubling 0-2-1 stretch, got that one back on another man advantage at 10:39 when Matthews redirected a nice pass from Marner for his 32nd to make it 5-1.
Schneider steadied things for a time in New Jersey's crease, but a wide-open Matthews buried his 33rd off another Marner feed at 3:58.
Coleman scored his second of the game with eight minutes left and completed his first-career hat trick at 15:36 to give the winger 18 goals.
Subban added his sixth on a 6-on-3 power play with Schneider off for an extra attacker with 1:58 on the clock.
Matthews finished the scoring with 80 seconds remaining, his empty-netter giving him 34 on the season.
''Good bounce-back game,'' said Matthews, who sits just two goals back of Boston's David Pastrnak for the NHL lead. ''A little bit of a lull in the second period. Some stuff we'd like to clean up and do better.
''But, all in all, nice to get back in the win column.''
Notes: Rielly has been battling a suspected lower-body ailment most of the season and is out for at least the next eight weeks. ... Toronto's Jake Muzzin, who broke a foot blocking a shot in New Jersey on Dec. 27, could resume skating on Wednesday. ... Sandin was named the best defenseman and a tournament all-star at the world juniors. ... Spezza became the 196th player in NHL history to play 1,100 regular-season games. ... The Leafs also recalled defenseman and 2017 first-round pick Timothy Liljegren from the AHL.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP-Sports