The Maple Leafs traded the 30th pick in the 2016 NHL Draft and a second-round pick in 2017 to Anaheim for Andersen and signed him to a five-year contract. Andersen would have been a restricted free agent July 1.

The Toronto Maple Leafs acquired Frederik Andersen from the Anaheim Ducks on Monday with the hope they have finally found a No. 1 goalie.

"He had one more year left and he was a restricted free agent," Maple Leafs general manager Lou Lamoriello said. "One of two things could have transpired; he could go to arbitration or we could have played out his qualifying offer, but when you're at his age (26), in five years, we are very comfortable with the extension.

"I think he has to know that we feel that he is our No. 1 goaltender and that the support is there, the confidence is there and the commitment is there."

Video: Maple Leafs acquire goaltender Frederik Andersen

Andersen was 22-9-7 with a 2.30 goals-against average and a .919 save percentage in 43 games (37 starts) for the Ducks this season, and he and John Gibson, 22, won a share of the William Jennings Trophy for allowing the fewest goals in the League.

The Maple Leafs allowed the seventh-most goals this season; Jonathan Bernier was 12-21-3 with a 2.88 GAA and a .908 save percentage in 38 games with Toronto. Garrett Sparks was 6-9-1 in 17 games. The Maple Leafs traded James Reimer (11-12-7 in 32 games) to the San Jose Sharks prior to the NHL Trade Deadline.

"I haven't given that much thought," Andersen said about the possibility of becoming a No. 1 goalie. "I'm just proud to be a Maple Leaf. I have to keep working hard to be in the net. That's my approach. Nothing is given to you."

The Maple Leafs finished with the worst record in the League this season and have the No. 1 pick in the draft, which will be at First Niagara Center in Buffalo on Friday (7 p.m. ET; NBCSN, SN, TVA Sports) and Saturday (10 a.m. ET; NHLN, SN, TVA Sports 2).

"Everyone knows this is a young team right now and more prospects are coming up that are doing well," Andersen said. "I know how hard they work for the games we played against them [this] season. I think they were better than the standings were showing."

Andersen is 77-26-12 with a 2.33 GAA and a .918 save percentage in 125 regular-season games with the Ducks. He was 17-9 with a 2.34 GAA and a .916 save percentage in 28 Stanley Cup Playoff games.

"I love his competitiveness," Lamoriello said. "If you look at his playoff history, he's always played well in the playoffs and he gives us size which today is a necessity the way the game is played, but his athleticism is exceptional.

"When you get a goaltender of this caliber with the experience he's had and the success ... I feel I've had the good fortune to have had similar goaltenders in the past that...acquiring him was the most important thing; the price was secondary."

Gibson has three years remaining on his contract with the Ducks and becomes their No. 1 goaltender. Anaheim has the No. 24 and No. 30 selections in the first round.

"The picks add in value as you accrue them," Anaheim general manager Bob Murray told the Ducks website. "I have no idea yet what's out there. I haven't even thought about what to do in the market. There are some situations that we have to address on this team. We'll try to address them. This was a situation that just had to happen at this point in time. There was no avoiding it."

With Andersen on the move, Murray said he will pursue a backup over the next few weeks, one preferably with experience.

"It has to be a veteran," Murray said. "We'll have to do our homework. A veteran guy that can handle a bunch of games. We don't want to overplay John yet. He'll have to be able to play 25 to 30 games. Character and hard-working type of guy. There are a few of them out there."