TORONTO - After one of the most-watched courtships in NHL history, the Toronto Maple Leafs got the answer they were hoping for Sunday.

John Tavares is coming home.

The centre signed with the Leafs as free agency opened, bringing an end to a saga that gripped hockey for the better part of seven days, and ramped up even further over the last 48 hours.

The deal is for US$77 million over seven years.

Tavares, from Mississauga, Ont., tweeted that he was going to Toronto Sunday afternoon -- then added a photo of himself sleeping in Maple Leafs sheets -- and the team announced the deal in a release moments later.

Tavares, who leaves the New York Islanders after nine seasons, met with his now-former club, the Leafs, San Jose Sharks, Boston Bruins, Tampa Bay Lightning and Dallas Stars this week as the six franchises on his preferred list made their pitch for the 27-year-old's services.