DALLAS — RadioShack Corp. filed for bankruptcy Thursday after attempts to reorganize its business over the last two years failed.

The Fort Worth-based company outlasted dozens of other electronics chains that have liquidated in recent years, such as Circuit City, Tweeter and Ultimate Electronics. But in the end, it ran out of time to fix its problems.

RadioShack filed in the Delaware U.S. Bankruptcy court. It listed assets of $1.2 billion and debts of $1.39 billion. The retailer also filed warn notices with the Texas Workforce Commission saying that a shutdown of the company means more than 1,000 job losses at headquarters and distribution facilities in Fort Worth.

The chain operates 21 stores in Maine, according to the company’s website.

RadioShack, which was founded in 1921, changed its name from Tandy Corp. in 2000. The company struggled in recent years as the wireless business became more competitive and items such as batteries and accessories became easier to buy online and in big-box stores. It also suffered a decade of missteps.

RadioShack posted losses that totaled $1 billion over the last three years and double-digit sales declines. The mobile phone and wireless contract business represented half of the company’s sales in recent years, but that side of the store has continued to burn cash.

Competition has accelerated not just from the wireless carriers AT&T and Verizon, but also from Wal-Mart, Costco and Best Buy.

In the past couple of weeks, clearance sales started popping up as RadioShack tried to shore up its dwindling cash position. Some stores have already closed.

CEO Joe Magnacca was hired in February 2013 to turn around the company.

In December, he announced a plan to cut annual costs by $400 million, partly by closing more than 1,000 stores. But lenders, led by Salus Capital Partners, balked at the plan, which Magnacca said was necessary to reorganize the business.

Analysts gave him credit for having good ideas but said his strategy was one that the board should have put in place years ago.

RadioShack ended the third quarter on Nov. 1 with total liquidity of $62.6 million – $43.3 million in cash and $19.3 million available to borrow from its bank loan. Total debt was $841.5 million.