After struggling for years as electronics shoppers shifted online, RadioShack filed for bankruptcy on Thursday, marking an ignominious end for the 94-year-old retailer that had sold the first mass-market computer.

RadioShack, based in Fort Worth, Tx., will sell up to 2,400 of its U.S. stores to General Wireless, an affiliate of Standard General, a hedge fund that led a rescue loan for the retailer last year. General Wireless will then set up “stores within stores” at 1,750 of those locations for wireless network operator Sprint S .

“This agreement would allow Sprint to grow branded distribution quickly and cost-effectively in prime locations,” Sprint CEO Marcelo Claure said in a statement. Under the terms of the deal, Sprint would effectively operate a “store within a RadioShack store”, occupying about one-third of the retail space at each. Sprint employees will sell mobile devices and plans on all Sprint brands including Boost and Virgin Mobile.

The rest of the retail outlets locations will be sold at bankruptcy auction.

RadioShack, which filed for bankruptcy in Wilmington, Del., had been the pre-eminent electronics store for decades, selling CB radios and cables and connectors, but had trouble finding its niche in the smartphone era. In its most recent quarter, sales fell 16%, while its quarterly loss — the 11th in a row — swelled to $161.1 million from a loss of $135.9 million a year ago.

RadioShack RSH said in its Chapter 11 filing that it had $1.2 billion of assets and $1.39 billion of debts. The company said that a lender group led by DW Partners has agreed to give it a $285 million loan to operate while in bankruptcy.

The liquidation of Circuit City Stores in 2009 was expected to give other electronics retailers some breathing room, but Amazon.com AMZN kept eating away at their market share.

For a link to the all court filings pertaining to the bankruptcy case, click here.