Lithium-ion battery maker A123 Systems on Friday announced plans to raise about $39 million in cash to shore up its finances as it struggles to survive in the midst of a massive recall of its automotive batteries.

But the company also warned that it only had cash to fund operations through the next four to five months -- and that's with the fundraising announced Friday. 

The Waltham, Mass.-based company said it planned to raise about $9 million after expenses through the sale of 7.7 million shares of its common stock for $1.30 per share, the closing price of A123 shares on Thursday, along with an unspecified number of warrants. The deal is expected to close on Tuesday.

The company also said it had satisfied conditions for the release of about $30 million in unrestricted cash related to senior convertible notes, which should be available for general corporate purposes as of Friday.  In May, A123 announced a private offering of $50 million in senior unsecured convertible notes and warrants for institutional buyers, which carry 6 percent interest and come with bi-weekly payments payable in cash or in shares of A123 stock, up to $25 million of the total.

A123 sought the debt financing to help mitigate the crisis caused by its major recall of batteries from its Livonia, Mich. facility, the recipient of $249 million in federal loan guarantees and $100 million in state tax credits. Losses from the recall are projected to be $66.8 million, and drove the company to report a record loss of $125 million for the first quarter of 2012, as well as issue a “going concern” statement pointing out that it could be forced to close its doors or seek "other strategic alternatives" to remain in business.

An analyst at Stifel Nicolaus has estimated that A123 will need to raise $75 million by the fourth quarter of 2012 and another $200 million in 2013 to fund its ongoing operations. While the $50 million debt deal helps satisfy the company's short-term cash needs, it could also cause longer-term harm to the company's share price due to the terms of the deal, according to John Anderson, writing at Seeking Alpha.

The company has also faced questions from U.S. Senators Chuck Grassley, R-Iowa, and John Thune, R-SD, as to whether it should continue to maintain access to its $249 million Department of Energy loan guarantee in the face of its recall and uncertain financial position. A123 has about $120 million left of the $249.1 million grant, and in April received a two-year extension on its deadline to spend the money.

A123 announced an important technological breakthrough in June that could lead to batteries that retain their charge at extreme temperatures without the need for expensive thermal management systems. But the company doesn't expect to see the technology enter volume production until mid-2013.

A123 lost $257.7 million in 2011, a 69-percent increase from losses in 2010. It held a long-term debt of $161 million as of May, and its market capitalization as of Friday afternoon stood at $170.68 million, a steep fall from its peak market cap of about $2.3 billion in 2010.

A123 customers include Fisker Automotive, General Motors, BMW, SAIC Motor Corp., Tata Motors and Smith Electric Vehicles, though the company didn't specify which were involved in the recall. A123’s battery defects did end up playing a role in problems for key customer Fisker, however, which has stopped work at its Delaware factory and faced problems meeting the terms of its own $529 million federal loan.

Transportation remains A123's most important line of business, although its grid storage business has been growing in the past year or so, with installations and orders that added up to 100 megawatts by the end of 2011, much of it in partnership with AES Energy Storage

A few months ago, a battery manufactured by A123 exploded and caused an injury at a General Motors battery lab. The battery leaked gases into a lab at GM’s Warren Technical Center in Michigan and an explosion ensued that sent one employee to the hospital with chemical burns, according to the Wall Street Journal. A123 is also receiving its share of class-action lawsuits

About a year ago, VC investor Vinod Khosla spoke to about 300 energy storage experts at the annual Energy Storage Association (ESA) meeting and predicted that A123 would not be around in ten years. He cited lithium's volatility and inherent safety issues. That news was less satisfying for the audience (which included A123).