Once all U.S. troops in Iraq have left by year's end, Washington will negotiate with the Iraqi government on a possible American role in training the country's land and air forces, Defense Secretary Leon Panetta said Friday.

Speaking to reporters aboard his plane en route to Bali, Indonesia, Panetta said the U.S. and Iraq have not yet agreed even on the number of U.S. military personnel who would be assigned to the U.S. Embassy in Baghdad to facilitate Iraqi arms purchases and to conduct initial training.

"That remains to be worked out," Panetta said shortly after President Barack Obama announced that all U.S. troops would depart Iraq by the end of the year.

In addition to what U.S. officials have envisioned as a staff of about 160 U.S. service members as part of the Office of Security Cooperation in the Embassy, Washington had been talking to the Iraqis about keeping a larger U.S. force, perhaps numbering in the thousands, to provide more comprehensive, collective training of Iraqi security forces beyond 2011. But those talks broke down over Iraq's refusal to grant immunity from prosecution for U.S. troops.

There are now about 39,000 U.S. troops in Iraq. Panetta referred to them as combat forces even though Obama ended the U.S. combat role in Iraq in August 2010, leaving troops in an "advise and assist" role to help Iraq forces.

"Once we've completed the reduction of the combat presence, then I think we begin a process of negotiating with them (the Iraqis) in order to determine what will be the nature of that relationship _ what kind of training do they need, what kind of security needs to they have," he said.

Panetta offered no estimate of the number of U.S. troops that the Pentagon might be willing to provide as trainers or for other functions in Iraq after this year, but he noted that the U.S. keeps thousands of troops in some other Persian Gulf nations as part of normal security cooperation and training partnerships.

He cited as examples Bahrain, where there are nearly 5,000 U.S. troops as part of the U.S. Navy's 5th Fleet headquarters; the United Arab Emirates with nearly 3,000; and about 7,500 in Qatar, where the U.S. maintains a major air operations center.

In his responses to questions about the future U.S.-Iraqi security relationship, Panetta appeared to indicate that he thinks the Iraqis would benefit from additional U.S. help in developing its forces beyond 2011. But he also suggested that he does not think Iraq will be vulnerable without it.

"Iraq has developed a very good capability to be able to defend itself," he said.

During a visit to Iraq in July, Panetta said he hoped the Iraqis would agree to extend the U.S. military presence beyond this year in order to bolster Iraqi training.

The top U.S. commander in Iraq, Army Gen. Lloyd Austin, has said repeatedly that Iraq is not yet fully capable of defending its own air space or land borders, and that it needs help in other areas such as intelligence and logistics.