GMAC Financial Services on Wednesday sold $2.9 billion in government-backed debt, ahead of a regulatory deadline next month that will test the company's capital levels and ability to absorb losses.

The sale, which comes after a $4.5 billion offering in June, uses up its capacity to issue up to $7.4 billion in government-backed debt, after getting approval for the debt program in May.

GMAC, the traditional lender to General Motors Co, converted to a bank holding company in December to become eligible for bailout money the U.S. Treasury was pumping into banks.

This offering further strengthens GMAC's liquidity position, which will support the company's ability to extend credit to consumers and businesses, GMAC said in a statement.

The Detroit-based firm, which is taking over the auto loan business of Chrysler, is also having discussions with the U.S. Treasury about a possible third cash infusion.

The cost of insuring GMAC's debt with credit default swaps fell on Wednesday to around 640 basis points, or $640,000 to insure $10 million for five years, from around 690 basis points on Tuesday, according to Markit Intraday.

The bond sale will help shore up capital ahead of a November 9 deadline for bank holding companies that regulators have viewed as being undercapitalized, including GMAC, to implement plans to enhance their capital positions.

Concerns that GMAC could fail the impending test had sent the cost of insuring debt at its residential mortgage arm, Residential Capital, spiraling in the past week as investors worried that the unit would need to be spun off.

Credit default swaps insuring ResCap's debt plunged 10 percentage points on Wednesday, to around 29 percent of the sum insured as an upfront cost, as these concerns ebbed.

That means it would cost $2.9 million to insure $10 million in debt for five years, plus annual payments of $500,000.

Concerns that GMAC will fail the November tests are likely overdone, said Ricardo Kleinbaum, trading sector specialist at BNP Paribas in New York.

We would expect Rescap to be protected in any further capital injection given the importance of its mortgage servicing unit, though origination volumes are dropping, he added.

GMAC is also scheduled to report its third-quarter earnings on November 4.

GMAC's new bonds priced on Wednesday at 31.6 basis points over comparable U.S. Treasuries, to yield 1.75 percent, said IFR, a Thomson Reuters service.

The debt will be backed by the Federal Deposit Insurance Corp under its Temporary Liquidity Guarantee Program, set up to relieve a financing squeeze for U.S. banks during the credit crisis. The program is set to expire on October 31, though a limited six-month safety net may be extended if needed.

Thanks to the government guarantee, the notes will be rated AAA by all three major rating agencies.

Citigroup, Deutsche Bank, Morgan Stanley and RBS managed the bond sale.

(Additional reporting by John Parry, Walden Siew and Dena Aubin; Editing by Kenneth Barry)