SCOTTSDALE, Ariz. -- Mike Babcock was fired as coach of the Toronto Maple Leafs on Wednesday and replaced by Sheldon Keefe, who was coach of the Toronto Marlies of the American Hockey League.

Babcock went 173-133-45 in five seasons in Toronto, making the Stanley Cup Playoffs in each of the past three seasons but failing to advance past the Eastern Conference First Round.

The Maple Leafs (9-10-4) are 0-5-1 in their past six games, including a 4-2 loss to the Vegas Golden Knights on Tuesday and a 6-1 loss to the Pittsburgh Penguins on Saturday.

[RELATED: Keefe prepared to fill role as coach of Maple Leafs]

"Our game is not really meeting our expectations," Maple Leafs president Brendan Shanahan said. "We're mistake-prone on defense, the attention to details aren't there. And even the offense, the explosive offense that our team has been known for, has been missing for a while now."

Shanahan said he and general manager Kyle Dubas weighed the move for several weeks.

"It wasn't an easy conversation to have. It wasn't pleasant," Shanahan said. "But we felt it was important for the club, and once you realize there's something that you should do and have to do, it's best to act on it."

Because he hired Babcock, who won two Olympic gold medals as coach of Canada (2010, 2014) and the Stanley Cup with the Detroit Red Wings in 2008, Shanahan said he felt obligated to dismiss him in person, flying Wednesday from Toronto to Arizona, where the Maple Leafs play the Coyotes on Thursday (9 p.m. ET; FS-A, FS-A PLUS, SNO, NHL.TV).

Shanahan praised Babcock's work ethic and commitment, and said he laid the foundation for the Maple Leafs but that something was missing, and he's not sure what it is.

"I think that's the magic question. We feel that we haven't played up to our expectations this year," Shanahan said. "I think that that there are key elements to our game and attention to detail that has been missing often this year."

Video: Elliotte Friedman reacts to Mike Babcock's firing

Babcock, who is 700-418-164 with 19 ties in 17 seasons with the Anaheim Ducks, Red Wings and Maple Leafs, said in a statement to TSN that he wished the Maple Leafs success.

"(Maple Leafs chairman) Larry Tanenbaum talked me into going to Toronto," Babcock said. "I would have never gone until I met Larry. He's one of the finest people I've ever met. Had an absolute riot and met another friend for life in (former general manager) Lou Lamoriello. I thought we did an amazing job taking a franchise from where it was to where we had 100-point seasons, we set franchise records if I'm not mistaken, got into the playoffs. I'm disappointed we didn't have the start to the year we wanted, and that's on me. I want to thank the fans, I want to thank the media, I want to thank the city. It was spectacular, I loved every second of it. And I wish the new group nothing but success. (Defenseman) Morgan Rielly has been here the whole time, I can't thank him enough. And all the players I got an opportunity to coach."

Now Toronto will look to turn things around under Keefe, who was in his fifth season with the Marlies, having guided them to the best regular-season record in the AHL twice (2015-16, 2017-18) and won a Calder Cup championship in 2018.

The Marlies are 10-2-2-1 and in first place in the North Division this season.

"There's a lot of work for [Keefe] to do, and there's a lot of work for the players to do," Shanahan said. "And they understand that, but we really believe in them. We believe in the players that we have here. We believe in Sheldon, obviously, in making this decision."

During his time with the Marlies, the 39-year-old worked with current Maple Leafs forwards Zach Hyman, Kasperi Kapanen, Trevor Moore and William Nylander, defenseman Travis Dermott and goalie Kasimir Kaskisuo.

"We're still optimistic that we're going to get back on track," Shanahan said. "We think Sheldon's earned it. Look at Sheldon's track record, the amount of players that play on the Toronto Maple Leafs that have played for Sheldon with the Marlies, the job he's done in developing players for us -- some early draft picks, some very late-round draft picks. He's had success basically everywhere."

Video: The NHL Now crew discusses the firing of Mike Babcock

Prior to joining the Marlies, Keefe spent more than two seasons as coach of Sault Ste. Marie of the Ontario Hockey League after being hired by Dubas.

"I think if you look around at all the different options that are there," Shanahan said, "and you look at someone who's been in our organization for quite some time now and had a lot of success and won a championship and knows these players very, very well, it's a situation where he's earned it."

Assistants Paul McFarland and Dave Hakstol will remain with the Maple Leafs.