The U.S. government said bankrupt A123 Systems Inc cannot be sold without its consent because the battery maker received a $249 million grant from the Energy Department, according to court documents.

Johnson Controls Inc of Milwaukee and China's Wanxiang Group Corp are battling over who will buy A123, a maker of lithium ion batteries for electric cars. The prospect of a U.S. government-financed company being sold to a Chinese rival has drawn opposition from some politicians, who say technology underwritten by U.S. taxpayers should not fall into foreign hands.

The government objected on Tuesday to the terms of the company's proposed sale order, saying in a court filing that its approval was needed before the government's clean energy grant could be assigned to a buyer. A123 can still draw $120 million under various government grants, according to court records.

The government also said the terms of the sale must include its right to demand compensation for the sale of assets such as equipment or property that were financed with the clean energy grant.

In the filing by Stuart Delery, a principal deputy assistant attorney general, the government did not indicate whether it supports or opposes any specific buyer for the company. Other parties that have expressed an interest in A123 include NEC Corp <6701.T> of Japan and Siemens AG of Germany.

A spokesman for A123 declined to comment.

A123 filed for Chapter 11 bankruptcy protection in October with a plan to sell its battery business to Milwaukee-based Johnson Controls for $125 million. The planned sale is subject to better bids at an auction next month. Wanxiang, an auto parts supplier, has said it intends to make a bid.

The money from the auction will go toward paying off A123's creditors.

Also on Tuesday, a group of retired military leaders and industrial consultants urged the Committee on Foreign Investment in the United States to block the possible sale to Wanxiang.

"This transaction would no doubt result in the loss of American jobs and the transfer of technologies critical to our nation's infrastructure and military hardware to China," said the letter from the Strategic Materials Advisory Council. Among those who signed the letter were Barry Costello, a retired vice admiral, and two retired major generals from the U.S. Air Force, Robert Latiff and Jeffrey Reimer.

Two Republican U.S. senators, John Thune of South Dakota and Chuck Grassley of Iowa, warned earlier this month Wanxiang could gain access to A123's military contracts if it were allowed to buy the company.

(Reporting By Tom Hals; Editing by Martha Graybow and Kenneth Barry)