The Strategic Framework Agreement allows for other forms of military cooperation besides U.S. troops on the ground. Signed at the same time as the security accord mandating the departure deadlines, it provides outlines for the U.S.-Iraqi relationship in such areas as economic, cultural and security cooperation.

"At the same time we're building a comprehensive partnership with Iraq under the Strategic Framework Agreement including a robust security relationship, and discussions with the Iraqis about the nature of that relationship are ongoing," Little said.

Pentagon press secretary George Little said the U.S. remains "committed to keeping our agreement with the Iraqi government to remove all of our troops by the end of this year."

A White House spokesman, Tommy Vietor, said discussions with Iraq about the security relationship between the two countries next year were ongoing.

A western diplomatic official in Iraq said al-Maliki told international diplomats he will not bring the immunity issue to parliament because lawmakers will not approve it.

Prime Minister Nouri al-Maliki has told U.S. military officials that he does not have the votes in parliament to provide immunity to the American trainers, the U.S. military official said.

Throughout the discussions, Iraqi leaders have adamantly refused to give U.S. troops immunity from prosecution in Iraqi courts, and the Americans have refused to stay without it. Iraq's leadership has been split on whether it wanted American forces to stay. Some argued the further training and U.S. help was vital, particularly to protect Iraq's airspace and gather security intelligence. But others have deeply opposed any American troop presence, including Shiite militiamen who have threatened attacks on any American forces who remain.

Both officials spoke on condition of anonymity because of the sensitivity of the issue.

A senior U.S. military official confirmed the departure and said the withdrawal could allow future but limited U.S. military training missions in Iraq if requested.

But a senior Obama administration official in Washington confirmed Saturday that all American troops will leave Iraq except for about 160 active-duty soldiers attached to the U.S. Embassy.

In recent months, Washington has been discussing with Iraqi leaders the possibility of several thousand American troops remaining to continue training Iraqi security forces. A Pentagon spokesman said Saturday that no final decision has been reached about the U.S. training relationship with the Iraqi government.

The decision ends months of hand-wringing by U.S. officials over whether to stick to a Dec. 31 withdrawal deadline that was set in 2008 or negotiate a new security agreement to ensure that gains made and more than 4,400 American military lives lost since March 2003 do not go to waste.

BAGHDAD—The U.S. is abandoning plans to keep U.S. troops in Iraq past a year-end withdrawal deadline, The Associated Press has learned. The decision to pull out fully by January will effectively end more than eight years of U.S. involvement in the Iraq war, despite ongoing concerns about its security forces and the potential for instability.

Iraqi lawmakers excel at last-minute agreements. But with little wiggle room on the immunity issue and the U.S. military needing to move equipment out as soon as possible, a last-minute change between now and December 31 seems almost out of the question.

Regardless of whether U.S. troops are here or not, there will be a massive American diplomatic presence.

The U.S. Embassy in Baghdad is the largest in the world, and the State Department will have offices in Basra, Irbil and Kirkuk as well as other locations around the country where contractors will train Iraqi forces on U.S. military equipment they're purchasing.

About 5,000 security contractors and personnel will be tasked with helping protect American diplomats and facilities around the country, the State Department has said.

The U.S. Embassy will still have a handful of U.S. Marines for protection and 157 U.S. military personnel in charge of facilitating weapons sales to Iraq. Those are standard functions at most American embassies around the world and would be considered part of the regular embassy staff.

When the 2008 agreement requiring all U.S. forces leave Iraq was passed, many U.S. officials assumed it would inevitably be renegotiated so that American forces could stay longer.

The U.S. said repeatedly this year it would entertain an offer from the Iraqis to have a small force stay behind, and the Iraqis said they would like American military help. But as the year wore on and the number of American troops that Washington was suggesting could stay behind dropped, it became increasingly clear that a U.S. troop presence was not a sure thing.

The issue of legal protection for the Americans was the deal-breaker.

Iraqis are still angry over incidents such as the Abu Ghraib prison scandal or Haditha, when U.S. troops killed Iraqi civilians in Anbar province, and want American troops subject to Iraqi law.

American commanders don't want to risk having their forces end up in an Iraqi courtroom if they're forced to defend themselves in a still-hostile environment.

It is highly unlikely that Iraqi lawmakers would have the time to approve a U.S. troop deal even if they wanted to. The parliament is in recess on its Hajj break until Nov. 20, leaving just a few weeks for legislative action before the end of year deadline.

Going down to zero by the end of this year would allow both al-Maliki and President Barack Obama to claim victory. Obama will have fulfilled a key campaign promise to end the war and al-Maliki will have ended the American presence in Iraq and restored Iraqi sovereignty.

The Iraqi prime minister was also under intense pressure from his anti-American allies, the Sadrists, to reject any American military presence.

An advisor close to al-Maliki said the Americans suggested during negotiations that if no deal is reached in time, U.S. troops could be stationed in Kuwait.

With the U.S. military presence in Iraq currently at about 41,000 and heading down to zero, almost all of those forces will be flowing out of Iraq into Kuwait and then home or other locations.

A western expert in Iraq said it is conceivable that if the Iraqi government asks early next year for U.S. troops to return, there will be forces still in Kuwait able to come back and do the job.

But he stressed that the core problems still remain on the Iraqi side about what types of legal immunity to give the American troops and whether parliament can pass it.

----

Associated Press writers Anne Gearan and Erica Werner contributed from Washington.

----

Lara Jakes can be reached at http://twitter.com/@larajakesAP

Rebecca Santana can be reached at http://twitter.com/ruskygal

© Copyright 2011 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.