Tyson Barrie and rookie Pierre Engvall came through to help new Toronto Maple Leafs coach Sheldon Keefe get a win in his NHL coaching debut.

Barrie scored his first goal of the season, Engvall got the first of his career and the Maple Leafs snapped a six-game losing streak with a 3-1 win over the Arizona Coyotes on Thursday night.

"Pretty special night for a lot of guys here," said Toronto's Auston Matthews, who also scored back in his hometown. "And a big two points with everything that's been going on the past couple of weeks and the past 36 hours."

Frederik Andersen stopped 30 shots to help the Maple Leafs end an 0-5-1 skid one day after Keefe replaced the fired Mike Babcock.

"The guys went out and played with confidence," Keefe said. "We had to find our way through the first period. I thought we had really good energy on the bench."

WATCH | Engvall scores 1st career goal in win over 'Yotes:

Tyson Barrie recorded his first goal with the Maple Leafs, Pierre Engvall scored his first NHL goal and Sheldon Keefe won his head coaching debut as Toronto beat the Arizona Coyotes 3-1. 1:34

Not everything was perfect in his first game behind the bench in the NHL, though.

"I was a little behind on making my line changes," said Keefe, who was in his fifth season as coach of the AHL's Toronto Marlies when he was promoted. "I'd like to speed that up a bit. But the players took care of me well there."

Some Maple Leafs players saw the coaching change as a chance for a new start.

"He came in with a really fresh attitude," Barrie said. "We know we weren't meeting expectations and we need to be better."

10/10 goal 🙌<br>11/10 celly 🤣<a href="https://twitter.com/hashtag/LeafsForever?src=hash&ref_src=twsrc%5Etfw">#LeafsForever</a> <a href="https://t.co/yyDYf6wVqx">pic.twitter.com/yyDYf6wVqx</a> —@MapleLeafs

Vinnie Hinostroza scored with 17 seconds left for Arizona to spoil Andersen's shutout bid. Darcy Kuemper finished with 29 saves. The Coyotes had won four of their previous five games.

"Too many mistakes and we didn't really defend good enough," Arizona's Oliver Ekman-Larsson said.

Barrie got the scoring started with 46 seconds left in the first period, beating Kuemper under the right glove after coming down the right side from the point with open ice.

"I think I did a good job jumping in on the pass and that's what I'm accustomed to," Barrie said.

WATCH | Leafs ready for Keefe era to begin:

John Tavares, Morgan Rielly and Auston Matthews spoke with the media about the hiring of Sheldon Keefe as new head coach of the Toronto Maple Leafs. 1:49

The Coyotes had trouble generating offence, as the Maple Leafs dominated the puck. Andersen was forced to make a glove save midway through the first on Carl Soderberg, and made a clean save of Jason Demers' shot on a break in the second off a feed from Phil Kessel.

Engvall scored short-handed after breaking up a point-to-point pass and beating Kuemper under his left leg with his left-handed shot with 3:11 remaining in the second.

Matthews made it 3-0 as he skated far side and beat Kuemper between the legs 48 seconds into the third period.

"With everything that [Keefe] threw at us in a short period of time that he'd like to see I thought we executed that for the most part," Matthews said.