RadioShack Corp., the 94-year-old consumer- electronics chain that sold the first mass-produced personal computer, filed for bankruptcy after failing to stave off competition from big-box retailers and online merchants.

The company said Thursday that it has an agreement to sell 1,500 to 2,400 of its stores to a unit of Standard General LP, its biggest shareholder. Standard General has a deal with Sprint Corp. to set up stores-within-stores at as many as 1,750 locations.

Thursday’s filing underscores the dramatic changes U.S. retailing has undergone since online merchants and big-box stores began supplanting traditional brick-and-mortar chains.

The Fort Worth, Texas-based company has been trying to compete with Amazon.com Inc. and Wal-Mart Stores Inc. while at the same time coping with what Chief Executive Officer Joe Magnacca has called an industrywide slump in demand for consumer electronics.

Since taking over two years ago, Magnacca has changed the product mix and remodeled or closed some locations, to no avail. The company has reported 11 straight quarterly losses, and its shares dropped 86 percent last year.

For all its struggles, the company still has some valuable assets, including a famous name that evokes nostalgia among hobbyists and locations at the heart of U.S. cities including New York, Chicago and San Francisco. Sprint and Standard General will be trying to build on that legacy.

Debevoise & Plimpton is advising Standard General on the deal. 

The case is In re RadioShack Corp., 15-10197, U.S. Bankruptcy Court, District of Delaware (Wilmington).

For more on RadioShack's solvency problems, see Amazon in Talks to Buy RadioShack Stores and RadioShack Said to Discuss Shutdown as Part of Sprint Deal

For Mergers & Acquisitions' restructuring coverage, see Turnaround Tuesday and our Distressed Company Watch List, which RadioShack is on.