When it comes to all things Danish, modern furniture, beer and pastries stand out, but arguably the country’s most famous export are tiny toy bricks. In 2016 alone, over 75 billion of the colorful plastic bricks were sold, and the 85-year-old company behind them reigns as one of the world’s most iconic toy manufacturers. But if it weren’t for a series of fires—and an ingenious woodworker—LEGOS may never have been built.

The LEGO story started in a Danish woodworking shop in the days before electricity. At the time, Billund was an obscure village, and Ole Kirk Christiansen was just a simple carpenter with ambition. As a young man, Christiansen turned his love of whittling and playing with wood into a business and, in 1916, he opened his own shop.

At first, Christiansen’s shop produced furniture like ladders, stools and ironing boards. But in 1924, just as he was looking to expand his successful business, his sons accidentally set a pile of wood chips in the shop on fire. The flames it produced destroyed the entire building—and the family’s home.

Inside the original Lego workshop when it was producing wooden toys. (Credit: Lego/Handout/Corbis via Getty Images)

Others might have given up with a total loss, but Christiansen saw the fire as an excuse to simply build a larger workshop. Tragedy continued to strike, however. In 1929, the American stock market crash plunged the world into depression, and Christiansen’s wife died in 1932. Bowed by personal and financial disaster, Christiansen laid off much of his staff and struggled to make ends meet.

Little did he know that those tragedies would lay the foundation for one of business’s great comeback stories. Since times were so hard, Christiansen made the hard decision to use his wood to create inexpensive goods that might actually sell. Among them were cheap toys.

The decision didn’t pay off—at first. Christiansen actually slid into bankruptcy, but refused to stop making toys when his siblings tried to make it a condition of a bailout loan. But his love of toys pushed the company ahead, even when it limped. He even renamed the company to reflect its new direction: leg godt, or “play well,” became LEGO.

Christiansen may have been a good ironing-board builder, but it turned out he was a brilliant toymaker. He refused to cut corners for the toys his company produced. Soon, his prototypes for ingenious models of cars and animals and his adorable pull toys gained a national fanbase. His bestseller, a wooden duck whose beak opens and closes when pulled, is now a coveted collectible.

Wooden toys produced by Ole Kirk Christiansen’s company. (Credit: Lego/Handout/Corbis via Getty Images)

In 1942, as Germany occupied Denmark, another fire threatened Christiansen’s livelihood when his entire factory once again burned to the ground. But by then, he was established enough to not only bounce back, but to be forward looking. When World War II ended, many traditional manufacturing products used to produce consumer goods simply weren’t available. As a result, many manufacturers looked to advances in plastics to create cheap alternatives.

Among them: plastic-injection molding, in which melted plastic is forced into the cavity of a precise mold. However, due to materials shortages the Danish government forbade its commercial use until 1947. Despite the ban, Christiansen bought Denmark’s first plastic-injection molding machine in 1946 and began to experiment with it for his toys. In 1947, he was finally allowed to use it for goods he could sell—and by 1949, the company was creating a plastic product called the Automatic Binding Brick.

The toy looks a lot like a modern LEGO brick, and according to LEGO the fact that its name was English, not Danish, was an homage to the Allied forces that liberated Denmark and put an end to World War II. The toy was inspired by a set of self-locking bricks invented by a British company, Kiddicraft. (LEGO says Kiddicraft told the company it was fine to use the design, but in 1981 they formally bought the rights to Kiddicraft bricks from their inventor’s descendants.)

Godtfred Kirk Christiansen, President of the Lego company in Denmark, explains the Lego building toys to children, 1967. (Credit: PA Images via Getty Images)

Christensen and his son, Godtfred, made improvements on the British design and began selling plastic bricks in 1949. Though they were not LEGO’s most popular toys, they became more and more popular as the years passed.

Ole Kirk died in 1958, just as his son was on the verge of using the simple Automatic Binding Bricks as the basis of a full-blown “System of Play.” Designed on the principle that all blocks should interlock and be interrelated—and increase both the imaginative potential of kids and sales—the system became the foundation of modern-day LEGO. That means that any LEGO block produced since 1955 can interlock with any other.

Just five years after launching its System of Play, LEGO sustained a third catastrophic fire. Like the first, this blaze sealed the company’s fate: Since the fire burned up all of the company’s wooden toy inventory, the company decided to ditch wood for good and move ahead with plastic.

Today, that decision means big business. Billund, Ole Kirk’s unknown town, is a tourist destination, and the LEGO Group has built itself into an industry titan. But it never would have happened without those simple bricks—or the fires that nearly destroyed a family’s dream three times over.