After a long summer standoff that extended well into the regular season, the Toronto Maple Leafs and restricted free agent William Nylander have agreed to terms on a new six-year deal.

The current year of the contract carries an average annual value of $10.2 million, while years two through six have a cap-hit of $6.9 million.

According to Sportsnet’s Nick Kypreos, the contract also comes with a $24.5 million signing bonus. The total value of the deal is $41.77 million.

Nylander had made it known he wanted to sign a long-term deal to stay in Toronto, but overall the two sides have been pretty quiet about negotiations over the past few months.

Nylander, who is coming off a pair of 61-point seasons, has remained in Europe over the course of the contract stalemate and was at one point skating with an Austrian top-tier team to stay in hockey shape. The 22-year-old is an important piece in the Maple Leafs’ rebuild, having found excellent chemistry with teammate Auston Matthews while helping the young squad emerge as a contender.

One signed, two more to go

Early in the summer, GM Kyle Dubas was asked if he could keep his powerful young core — Matthews, Nylander and Mitch Marner — together along with the newly signed prized free agent John Tavares.

His response?

“We can, and we will.”

Of the three eligible to sign at the time, Nylander was the highest priority as he was the only one without contract for 2018-19. (Matthews and Marner are each in the final year of their respective entry-level deals and will hit restricted free agency in July 2019.) He was also the most intriguing, and not just because of the months-long stalemate between team and player in negotiations. While cap space isn’t yet an issue for the Maple Leafs as they emerge from their rebuild as a contender, Nylander’s deal — whether long-term or short — would have a direct impact on the extensions to be signed by his teammates.

“We’ll be very patient,” Dubas told Elliotte Friedman and Jeff Marek on the 31 Thoughts podcast in early July. “I always think that when a player is going to make a commitment of any length, particularly when they’re signing up long-term, that we need to sit with the player and make sure that the player knows where we’re going as a program and what our vision and our plans are so those are discussions that I’ll have with each of the individual players that are due extensions here or are due contracts for next season.”