Troubled lender CIT Group, one of the key financiers to the apparel and retail industry, has warded off an imminent bankruptcy threat by agreeing a $3bn loan and begun plans to restructure its liabilities.

The last-minute emergency funding deal has been provided by some of the company's main bondholders and will ensure it can continue to provide credit to its small and middle market customers.

As the largest factoring firm to the apparel sector - responsible for an estimated 60% of factoring in the US apparel and footwear industry - there had been fears that if its failure would cause major disruptions in the apparel supply chain.

Not only would it have left retailers with a shortage of merchandise during the crucial back-to-school and holiday seasons, but it could also have led to another round of cost cuts, layoffs or shut downs.

CIT now says that under the 2.5 year maturity loan it has immediate access to $2bn in funds with another $1bn due to be available within ten days.

Without giving details, CIT also said it is planning a "comprehensive restructuring of its liabilities to provide additional liquidity and further strengthen its capital position."

"We are now actively focused on a restructuring plan that will better position our company for the long term," confirmed chairman and CEO Jeffrey M Peek.

As the first step in this recapitalisation plan, the company has started a cash tender offer for its outstanding floating rate senior notes due 17 August.

The offer will be for $825 for each $1,000 principal amount of notes tendered on or before 31 July.

CIT was forced to restructure some of its debt payments after the government dashed hopes of a bailout under the Treasury's Troubled Asset Relief Program (TARP).

The company's clients are thought to include retailers Bon-Ton Stores Inc and Burlington Coat Factory as well as suppliers like denim brand Joe's Jeans.

Its case was backed by several US trade groups who sent a series of letters to Senator Christopher Dodd, Representative Barney Frank, and Treasury Secretary Timothy Geithner highlighting the pitfalls of allowing CIT to enter bankruptcy.

Kevin Burke, president and CEO of the American Apparel & Footwear Association (AAFA) said the the availability of credit and cash flows is key at a time when the industry's busy shipping season begins and holiday orders are placed.

Likewise, National Council of Textile Organizations (NCTO) president Cass Johnson said the loss of factoring and loan instruments from CIT "could put many textile companies and their suppliers out of business."

And Tracy Mullin, president and CEO of the National Retail Federation (NRF) described CIT as "too important to the retail industry to be allowed to fail."

Despite the $3bn lifeline thrown at CIT, its future is still far from certain. The financing may simply delay a bankruptcy filing, it may haemorrhage customers who are spooked by its near demise, and it may simply struggle to pay the high interest rates agreed with bondholders.