Toys “R” Us, the iconic retail chain that has sold toys and games to millions of children for generations, is closing shop in the United States.

After filing for bankruptcy protection in September and suffering through a brutal holiday shopping season, the company decided on Wednesday to close or sell all of its remaining stores, after executives met with creditors throughout the day, according to three people briefed on the discussions.

More than 30,000 American jobs are at risk as the company winds down. It is a colossal failure for a company that started out in 1948 as a small store in Washington selling cribs, strollers and other baby items.

The business eventually grew to more than 2,000 stores, with a wide inventory that made it a destination for children and with an advertising jingle — “I don’t want to grow up, I’m a Toys ‘R’ Us kid” — that was embedded in the American consumer consciousness. The company’s headquarters in Wayne, N.J., are on Geoffrey Way, named after its once-ubiquitous giraffe mascot.