(CNN Money) — Toys “R” Us is closing its doors after 70 years in business.

The iconic toy retailer will shut or sell all of its 735 stores in the United States, according to court documents filed early Thursday. About 31,000 jobs in the United States are at risk.

READ MORE: CDC To Recommend Vaccinated People Should Wear Masks Indoors Again

The announcement marks the end for a company that sold toys to millions of American kids. For half a century, Geoffrey the mascot giraffe invited children to its giant playhouses. Legions of adults who came of age in the 1980s and 1990s can probably still whistle its jingle: “I’m a Toys ‘R’ Us kid.”

Related: Meet the woman who wrote the Toys ‘R’ Us jingle

But Walmart, Target and other big-box retailers — stores that sold aisles of toys and everything else, too — began to erode its dominance. And then the emergence of Amazon sped its demise.

In September, Toys “R” Us filed for bankruptcy, hoping to shed debt and reinvest in its stores. But the turnaround didn’t work. In January the company said it would close 182 stores across the United States.

READ MORE: UCSF Dr. Peter Chin-Hong On COVID Delta Variant Surge: 'Desperate Measures Are Needed In Desperate Times'

The fate of hundreds of stores worldwide is unclear. The company said many of its stores in Canada, Europe and Asia “remain strong, viable businesses,” and may be saved or sold. On Wednesday, Toys “R” Us said it was closing all of its stores in the UK.

Tell us your Toys “R” Us memories

Toys “R” Us hasn’t made a full-year profit since 2012 and has lost $2.5 billion since then. It reported a loss of $953 million in the first nine months of last year alone. Sales during the recent holiday period, which the company has yet to report, are believed to have been very bad.

The company was taken over by private equity giants KKR, Bain Capital and real estate investment company Vornado in 2005. Together they paid $6.6 billion, but saddled the company with $5.3 billion in debt.

At the time of its bankruptcy, Toys “R” Us disclosed it had about $5 billion in debt and was spending about $400 million a year just to pay for it.

MORE NEWS: VIDEO: Shoplifter Fills Up Backpack With Stolen Goods During Stroll Through San Francisco Walgreens

© Copyright 2018 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.