Mattel (MAT) said Friday it agreed to buy Mega Brands for roughly $460 million including debt, as the toy maker looks to better compete with Lego.

Shareholders of Canada's Mega Brands will receive C$17.75 a share, valuing the deal at 407.5 million Canadian dollars. That reflects a 36% premium over Thursday's closing price in Toronto.

Mega Brands makes Mega Bloks, a construction toy and Lego rival. The company also owns arts and crafts brand Rose Art.

Mattel's portfolio of toys includes Hot Wheels, Matchbox and Barbie. The El Segundo, Calif.-based company, the world's largest toy maker, said part of its growth strategy includes making acquisitions to increase Mattel's footprint in new and growing categories.

The construction play pattern is popular, universal and has had one of the fastest growth rates over the past three years, said chairman and CEO Bryan Stockton.

Mattel said it will keep Mega Brands' headquarters in Montreal. Mega Brands employs a total of 1,700 people in more than a dozen countries.

Late last month, Mattel reported a surprise drop in sales during the critical holiday period, although its fourth-quarter profit rose more than 20%.

Shares ticked 18 cents higher, or 0.5%, to $37.33 in recent trade.

Follow Matthew Rocco on Twitter @MatthewRocco