Toronto Maple Leafs center William Nylander agreed Saturday to a six-year contract extension with an average annual value of $10.2 million this season and $6.9 million over the next five seasons, according to a team press release.

The 22-year-old Nylander has 48 goals and 87 assists in 185 games over three seasons. A restricted free agent prior to the contract agreement, Nylander has sat out this season as he sought a long-term deal with the Maple Leafs.

Nylander faced a 5 p.m. ET Saturday deadline to sign a new contract, or else he would have missed the entire season. That won't happen, however, and Nylander will now join the 18-8 Leafs.

The Maple Leafs are somehow third in the NHL in points despite missing Nylander all season and center Auston Matthews for 14 games. Matthews returned Wednesday after recovering from a shoulder injury and has dominated with 12 goals in 12 games this season.

With Nylander and Matthews in the mix, the Maple Leafs look like No. 1 contenders for the Stanley Cup. In addition to that duo, forward Mitchell Marner is second in the league with 30 assists, center John Tavares is seventh with 17 goals and Frederik Andersen is third with a 93.2 save percentage. Toronto leads the NHL in goal differential at plus-26.

The Leafs' issue is that the only two teams with more points reside in their division. The Tampa Bay Lightning and Buffalo Sabres each have 37, though the previously scorching-hot Sabres may be coming back to Earth after losing two straight following a 10-game winning streak.

Still, the Maple Leafs will be in much better position if they win the Atlantic Division, as they could then avoid a potential two-round gauntlet in which they'd have to beat the Lightning and Sabres in best-of-seven series just to get out of the divisional playoffs.

Having Nylander back certainly will help toward that goal as the Leafs look to win their first Stanley Cup since 1967.