MARCUS BRANDT / AFP / Getty Playing with lego

For devotees, Monday sees the 50th anniversary of an event in Copenhagen that transformed toys and revolutionized childhood itself.

It was at 1:58 p.m. on January 28, 1958, that then-Lego head Godtfred Kirk Christiansen filed a patent for the iconic plastic brick with its stud-and-hole design. Since then, the company has made a staggering 400 billion Lego elements, or 62 bricks for every person on the planet. And if stacked on top of one another, the pieces would form 10 towers reaching all the way from the Earth to the Moon.

But Lego's legacy lies less in numbers than in its creative influence. The colorful bricks have littered playroom floors for generations of families. But they have also spurred ingenuity among children that few toys can claim before and since. The company has always emphasized the importance of free-form play, and Lego's popularity can be attributed to the amount of imagination children use to build with the bricks.

The Lego company was founded in 1932 by Danish carpenter Ole Kirk Christiansen, a carpenter from Billund who had a sideline in wooden toys. He named the company after an amalgamation of the Danish phrase "leg godt," which means "play well."

The basic eight-stud red Lego brick was first sold in Denmark in 1949. But it took a further nine years for Ole Kirk's son, Godtfred Kirk, to file the patent for the versatile "Automatic Binding Brick" with its interlocking 2x4 studs. The plastic bricks are part of a unique system: tiny tubes inside give the knobs on top of other blocks more places to grip. They hold together well but can be taken apart easily by a child. And consistency has been key: the bricks produced today have the same bumps and holes, and can still interlock with those produced back in 1958. Fifty years on and the Lego Group is the world's fifth largest toymaker in terms of sales, after Mattel, Hasbro, Bandai and MGA Entertainment.

Over the years, the Lego group has built up the brand. It developed the larger Duplo series in the 1960s for younger children who had trouble handling the original tiny Lego bricks (Duplo is still going strong too). In 1968, the company opened its first Legoland theme parks, near its Billund birthplace. Parks in Windsor, England, Carlsbad, California and Günzburg, Germany followed, each using around 50 million bricks to create replicas of monuments and landmarks such as the Eiffel Tower, Mount Rushmore, and the Sydney Opera House. Each park receives around 1.4 million visitors per year.

But over the past decade, the group has struggled to keep pace with changing toy trends: the basic plastic bricks find it particularly tough to compete with games consoles like XBox and PlayStation to attract kids' attention. After years of eroding sales, the company posted its first-ever losses in 1998.

Radical remedies were needed to restore the brick's reputation. Tie-ins helped: the company's link-up with Star Wars revived the brand, and even led to its own video games: Lego Star Wars II sold 1.1 million units in its first week of release in 2006. If you can't beat 'em, join 'em, it would seem.

In recent years, a series of brutal job cuts, asset sales and cost-cutting measures have pruned the company down. Staff numbers have fallen from 6,000 in 2004 to some 4,500 today. The Legoland parks were sold in 2005 to Merlin Entertainments, part of the Blackstone private equity group, which owns Madame Tussauds and Sea Life. And critically, distribution, packaging and production has been outsourced to Eastern Europe and Mexico. As a result, the Lego Group turned a $374 million loss in 2004 into a $281 million profit in 2006.

The group itself is only planning low-key celebrations of the patent anniversary: a special-edition of its 1950s-style Town Plan set with three gold bricks, and a worldwide building contest with a grand finale at Legoland Billund. And for most Google users  itself a website which keeps building and growing in size  the homepage spelling of the company name in Lego blocks Monday will come across as just another of the web giant's quirks. But for the millions who grew up on the brick  and the millions more still fitting them together  that lunchtime visit to the patent office proved priceless.