US and Iraqi negotiators are working on the details of an agreement to establish a legal basis for the presence of US soldiers after the end of this year, the White House said Friday. "We are in the process of working out details right now," said Gordon Johndroe, a White House spokesman. "There are still discussions ongoing." US Secretary of State Condoleezza Rice was in Iraq Thursday, holding several hours of talks on the broader military and political agreement with Iraqi Prime Minister Nuri al-Maliki and Foreign Minister Hoshyar Zebari. President George W Bush spoke with al-Maliki Friday morning from his ranch in Crawford, Texas. The Washington Post reported Friday the agreement calls for the withdrawal of all US combat forces by the end of 2011. Johndroe did not confirm a date but pointed to an earlier statement by Bush and al-Maliki that the agreement would stipulate goals for removing US troops. The US-Iraqi agreement will replace a United Nations mandate that expires at the end of 2008. Bush wanted the deal completed by the end of July, but the two sides hit snags in the negotiations. The United States wants the US military to be able to operate freely in Iraq without have to inform al-Maliki's government of missions, and immunity for US troops from Iraq's criminal laws. Al-Maliki insisted on establishing timeframes for withdrawals, a move Bush has resisted. Instead, they agreed to work toward setting a "time horizon" for Iraqi forces to assume control of missions so the Americans can pull out more troops. Even after combat troops pull out, the US will still likely keep military trainers in Iraq and special operation units to hunt al- Qaeda, dpa reported.