(Barbie photo by EPA/Jason Szenes; Lego AP Photo/Warner Bros. Pictures)

Barbie may be queen of the Malibu Dreamhouse. But could she rule the hardened Danish castle known as the Lego Group?

Mattel, which became the world's biggest toy company on the strength of Barbie's calves, is hoping to keep that spot with an assault on Lego, the Danish company whose plastic bricks have become a multibillion-dollar global brand -- and  made it the second-largest toy company -- with sales that boomed even through the Great Recession.

Mattel's secret weapon? Plastic blocks that look kind of like ... Legos.

The California firm that has stuffed Christmas stockings with Hot Wheels, games and many an action figure, announced Friday that it was taking over Canada-based Mega Brands, manufacturers of the Mega Bloks toy that uses an interlocking system similar to that pioneered by Lego.

The merger says a lot about the toy business and consumer tastes. Mattel has a wide arsenal of tangible, 3D, put-your-hands-on-them toys -- in an age when you can catapult a virtual angry bird or slice fruit with ninja blades with nothing more than electromagnetism and a fingertip. The company's global sales crept up a mere 1 percent last year.

Lego has seemingly been immune to the shift toward virtual play. Its sales have quadrupled over the past decade, as the company tapped into smart licensing agreements to produce models of "Star Wars" spaceships and other popular items. It also caught the geek wave, with sets that included programmable robotic elements that gave kids a chance to code computers while they were snapping blocks together. Functionality and image kept the product in sync with the times even as its blocks stayed analog.

Mega Bloks has been the also-ran, though comparisons between the two trigger deep intensities on plastic brick and block fan Web sites where Mega Bloks' cheaper price and more modeled sets are compared with the tight engineering -- and high cost -- of Legos. Mega Bloks has also gone the branding route, striking deals for material from the videogame Halo, the Hello Kitty line, and Barbie herself (whose figure, it could be noted, looks a bit more normal in Mega Bloks dimensions than in the original).

What Mega Bloks has not achieved yet is sales. The company had sales of around $400 million in 2013, compared with $4.1 billion for Lego last year. And in Lego's case, the figure was up 11 percent at a time when world toy sales were down.

Still, Mega noted in a press release, that makes Mega Bloks number two in the category, and Mattel chief executive Bryan G. Stockton said the Montreal company would "benefit from our scale."

But enough to tangle with this?