John Tavares needed to post only one picture on his Twitter account to explain the grip the Maple Leafs have had on him since he was a youngster growing up in suburban Toronto.

The photo featured a young Tavares in bed, fast asleep on a pillowcase and under a blanket adorned with Maple Leafs logos, and accompanied by a note that read: “Not everyday you can live a childhood dream.”

In bidding farewell to the New York Islanders, where he was the captain and face of the franchise since being drafted with the No. 1 pick in 2009, Tavares chose Toronto and agreed to a seven-year, $77 million contract about an hour after the NHL’s free-agency signing period opened on Sunday. The skilled center was considered one of the biggest prizes on the market.

The 27-year-old Tavares spent last week assessing offers from with the Islanders, San Jose, Toronto, Dallas, Tampa Bay and Boston.

Tavares’ average annual salary of $11 million per season is the highest signed by a free agent since the NHL introduced the salary cap in 2005. And his signing offsets the Maple Leafs’ loss of forward James van Riemsdyk, who left in free agency to sign a five-year, $35 million contract to return to Philadelphia. Van Riemsdyk is a five-time 20-goal scorer who spent his first three NHL seasons with the Flyers before being traded to Toronto in 2012.

Toronto also lost center Tyler Bozak, who signed a three-year, $15 million contract with St. Louis.

While the Bruins missed out on the big prize, they made several smaller moves on free agency’s opening day, most notably bringing in veteran Jaroslav Halak as their new backup goaltender.

Halak, 33, signed a two-year, $5.5 million deal to replace Anton Khudobin, who received a two-year contract from Dallas on Sunday.

Halak appeared in 54 games with the Islanders last season, posting a record of 20-26-6 with a 3.19 goals-against average and a .908 save percentage. Halak’s numbers could rebound with a lighter workload and a stronger defense in front of him.

Boston also brought in defenseman John Moore on a five-year deal worth $13.75 million. Moore has 32 goals and 67 assists in 447 games over eight NHL seasons, the last three with the New Jersey Devils.

The Bruins also signed forwards Chris Wagner, Joakim Nordstrom and Mark McNeill and defenseman Cody Goloubef, and agreed to a three-year deal with second-round draft pick Axel Andersson.

Boston lost center Riley Nash, who signed with Columbus on a three-year, $8.25 million deal.

There were plenty of other moves around the league, including the Golden Knights’ signing forward Paul Stastny to a three-year, $19.5 million contract. Vegas lost free agent forward Dave Perron, who returned to St. Louis for a four-year, $16 million deal.

Veteran defenseman Jack Johnson is heading to Pittsburgh on a five-year, $16.25 million deal. The 31-year-old Johnson spent the past six-plus seasons with the Columbus.

The Chicago Blackhawks signed former Carolina starting goalie Cam Ward, forward Chris Kunitz and defenseman Brandon Manning. Ward provides the Blackhawks veteran insurance after starter Corey Crawford missed most of last season with an upper-body injury.

Detroit added goalie Jonathan Bernier for three years and brought back forward Thomas Vanek on a one-year deal. Defenseman Oliver Ekman-Larsson (Arizona) and center Logan Couture (San Jose) agreed to eight-year contract extensions, while defenseman Ryan McDonagh signed a seven-year extension with Tampa Bay.