Commercial lender CIT Group Inc , teetering on the brink of bankruptcy, said on Wednesday it has secured $4.5 billion of additional financing.

Lenders in the new facility will be among the first in line to collect money from CIT if it goes bankrupt.

CIT is trying to restructure its debt before another $800 million of obligations come due at the beginning of November. The lender to about a million small and mid-sized businesses is looking at either filing for bankruptcy, or getting its current lenders to agree to new terms on their debt.

The new facility matures in 2012, and is backed by an estimated $30 billion of assets, which are also supporting a $3 billion loan the company received over the summer.

The $4.5 billion financing is a setback for activist investor Carl Icahn, who also had been trying to lend to the company.

CIT said the proceeds will be used to refinance some of the company's existing secured debt, which it may have to pay off as it restructures debt. The loan will allow the company to continue serving the small and medium sized companies it lends to, the company said.

The 101-year-old company is trying to restructure its liabilities by getting investors to forgive at least $5.7 billion of debt and exchange their securities for new notes before October 29. Investors held about $30 billion in unsecured debt at the end of June, and the company had about $70 billion of assets at the time.

If CIT does not get enough support for the exchange, it hopes that creditors will agree to a prepackaged bankruptcy. People familiar with the matter told Reuters this week that the exchange is likely to fail, and the company is likely to file for bankruptcy.

However the company handles its liabilities, it is hoping to increasingly rely on its bank subsidiary, which can borrow money through deposits, to make new loans and leases.

Icahn is pushing for CIT to stop making new loans, and instead file for bankruptcy, collect money from its existing loans and use the funds to pay off creditors.

Carl Icahn said earlier this month he was willing to lend to CIT on better terms than what it was seeking from other investors.

CIT said on Wednesday it was unable to determine whether Icahn had arranged sufficient funding for his proposal.

Icahn, has snapped up CIT debt in the past few months and claims to be the company's largest bondholder.

CIT said on Wednesday that it is putting together a process for naming directors if the company files for a prepackaged bankruptcy. In that scenario, most of its directors will have been chosen by bondholders, the company said. Current directors would make up no more than five of 13 directors to be elected at next year's annual meeting.

CIT's shares rose 10.4 percent to close at $1.06 on the New York Stock Exchange.

(Reporting by Elinor Comlay, editing by Gerald E. McCormick, Carol Bishopric and Tim Dobbyn)