It’s been a long time coming, but RadioShack is finally officially bankrupt. The corporate shell of RadioShack received approval of its chapter 11 bankruptcy plan Wednesday. Finalizing the deal required making several settlements with lenders so that the one-time biggest electronics retailer in the country could get a bankruptcy judge’s approval for the proposal.

RadioShack

At the final hearing at the U.S. Bankruptcy Court in Wilmington, Delaware, Judge Brendan Shannon announced he would sign both the settlements and the chapter 11 plan, which will see the funds from the firm’s liquidation passed on to its creditors.

“This has been a very challenging case,” Shannon commented. “There were issues that could have derailed the case, frankly, any number of times.”

Facing at least $1 billion in debt, RadioShack filed for bankruptcy in the first quarter of the year and shuttered or sold practically all of its 4,000-store chain. The iconic U.S. firm was the trailblazer in consumer electronics, but had suffered over the last decade or so from not managing to keep up with digital technology and tough competition from low cost online electronics retailers.

The closing of RadioShack stores nationwide was symbolic of the end of an era to many Americans.

Details on final RadioShack bankruptcy terms

Things were looking iffy for a deal in the RadioShack until several settlements were finally reached last week, as numerous legal battles were standing in the way of the firm’s plans to finish up its chapter 11 plan. In a court hearing a few weeks ago, two of the former RadioShack’s top-ranking lenders (Manhattan hedge fund Standard General LP and Wells Fargo) were locked in a contentious dispute.

Standard General and Wells Fargo claimed that the ex-RadioShack should pay the steep legal fees relating to the lawsuit brought by junior creditors, which was likely to lead to more expenses and maybe lead to other creditor-repayment plans collapsing.

The litigation expenses could have topped $15 -$20 million, Standard General, which bought RadioShack’s brand and saved about 1,700 stores, claimed in court filings.

The junior creditors, however, eventually agreed to give up the lawsuit, meaning the former electronics retailer can go ahead and begin repaying its debt. As part of the agreement, Standard General, Wells Fargo and other banks will chip in up to $9.4 million in cash and savings to a liquidation trust called for by the plan. Standard General also agreed to give up its rights to close to $30 million in unsecured bonds.