A123 secures $50 million to fund its bankruptcy.

A U.S. Bankruptcy judge has approved a request by bankrupt battery maker A123 Systems Inc. to borrow $50 million from China's Wanxiang Group Corp. The funds will be used to help A123 finance its bankruptcy proceedings.

Judge Kevin Carey approved the measure earlier this week in Wilmington, Delaware. Johnson Controls was originally signed up to back A123's bankruptcy financing, but decided to withdraw to avoid a conflict with Wanxiang.

Shortly after A123's bankruptcy filing last month the company agreed to sell its business assets to Johnson Controls for $125 million. However, Wanxiang, which agreed to purchase a controlling stake in the battery maker for $450 million prior to its bankruptcy filing, says it plans to bid on A123's assets.

However, A123 is now trying to separate itself from Wanxiang, saying in a court document obtained by Bloomberg that the company "may not be able to secure the governmental regulatory approvals it is seeking even under this extended timeline."

A123 was the recipient of a $249.1 million federal grant, giving the government a say in the new ownership of the company.