TORONTO - William Nylander's contract impasse has finally come to an end.

The restricted free agent signed a six-year deal with the Toronto Maple Leafs on Saturday, just before the 5 p.m. ET deadline. The Leafs announced that the extension will pay Nylander an average of US$6.9 million per year from the second to sixth years and $10.2 million this season.

Nylander, who was selected eighth overall by the Leafs in the 2014 draft, had to sign a contract by Saturday's deadline in order to be eligible to play in the NHL this season.

Nylander and the club had been at odds on the terms of a new agreement after his entry-level contract expired July 1, with negotiations stretching through the summer, into training camp and ultimately forcing the 22-year-old winger to miss 26 games this season.

There were reports Nylander, who remained in Europe during talks between his representatives and Leafs general manager Kyle Dubas, was initially asking for $8 million per season on a long-term deal, with Toronto believed to have been countering with an offer in a $6-million range annually.

The son of former NHLer Michael Nylander was the first of Toronto's young star forwards - Auston Matthews and Mitch Marner are the others - to hit restricted free agency.

Nylander is coming off back-to-back 61-point seasons, including a 2017-18 campaign that saw him score 20 goals and add 41 assists. He had 49 points at even strength, with a team-high 34 assists.

The Calgary-born Swede has 48 goals and 87 assists for 135 points in 185 career games. Nylander has added two goals and six assists in 13 playoff outings.

After the Leafs lured centre John Tavares to Toronto with a seven-year, $77-million contract in free agency this summer, head coach Mike Babcock mused about a top line of Nylander, Matthews and veteran winger Patrick Marleau.

But Kasperi Kapanen, one of Nylander's good friends, occupied the right side on that unit for most of the early part of the schedule until Matthews suffered a left shoulder injury on Oct. 27 that ruled him out of action for 14 games.

Matthews returned to the lineup Wednesday, scoring twice and adding an assist in a 5-3 victory over the San Jose Sharks.

Toronto, a popular pre-season pick to hoist the Stanley Cup this spring thanks in large part to its explosive offensive talent up front, has a record of 18-8-0 heading into Saturday's road game against Minnesota and was third in the overall standings.

Matthews and Marner, a pair of 21 year olds whose entry-level contracts are set to expire next summer, have said they're talking with the Leafs about new deals.

Matthews could be looking for something in the neighbourhood of the $12.5 million per year Edmonton superstar Connor McDavid takes home, while Marner's ballpark might land somewhere in the $10-million range of Buffalo captain Jack Eichel.