One of the great turnaround stories of the past decade has come unravelled as today Denmark’s Lego announced a decline in revenues and plans to eliminate 1,400 jobs.

In an earnings statement released today, the Denmark-based maker of toys and video games said revenue fell 5 percent during the first six months of 2017. It blamed the drop on weak sales in Europe and the U.S.

“We will find more opportunities to engage with kids and parents, including innovative ways to blend physical building and digital experiences, such as our successful Lego Life social platform and Lego Boost building and coding set,” said Lego group chairman Jørgen Vig Knudstorp in a statement. “We have a powerful and loved global brand, a strong business, and are confident we can reach more children around the world.”

Wind the clock back 15 years, and the beloved toy maker seemed on the brink of collapse. In 2003, the company reported a loss of $220 million. It was widely assumed it would be acquired by a private equity firm or rival Mattel.

Instead, the company turned the reins over the Knudstorp, who embarked on a reinvention of Lego that just might rival the comeback Apple made under Steve Jobs. The company began engaging more with fans to develop products, expanded heavily into video games, and dramatically expanded its partnerships around other creative titles like Harry Potter.

Lego’s cultural re-ascension seemed to culminate in 2014 with The Lego Movie, which proved an enormous box office and critical hit. In 2016, the company reported the highest revenues in its history. 

But 2017 has been rough.

Knudstorp blamed the problems on an organization that has grown too complex and unwieldy. He plans to streamline the company’s structure, which includes trimming 8 percent of its 18,200 jobs to “simplify our business model.”

Lego’s survival is not in doubt as it was back in 2003. And there are bright spots, such as continued growth in China. But it’s magical run is over for the moment, and that’s forced management to take today’s drastic steps to reboot the business and find a way to grow again.

“We are very sorry to make changes which may interfere with the lives of many of our colleagues,” Knudstorp said in the release. “Our colleagues put so much passion into their work every day, and we are deeply grateful for that. Unfortunately, it is essential for us to make these tough decisions.”