BAGHDAD, Iraq (CNN) -- U.S. and Iraqi negotiators have reached agreement on a proposal calling for a complete U.S. military withdrawal from Iraq by 2012, the head Iraqi negotiator said Friday. The deal still must be approved by both sides, said Mohammed al-Haj Hamoud, deputy foreign minister and head of the Iraqi negotiating team. Hamoud said Thursday's meeting between U.S. Secretary of State Condoleezza Rice and Iraqi Prime Minister Nuri al-Maliki was helpful in reaching the tentative agreement. Hamoud said the proposal also says the last date for the presence of U.S. troops in cities and towns will be June 30, 2009. There are clear caveats, however. If the Iraqi government sees the necessity of keeping the American forces in cities and towns or in Iraq past December 31, 2011, it would ask that the Americans stay. A joint Iraqi-U.S. committee would help define the duration and number of forces that would be needed and regularly assess the security situation on the ground. Regarding the issue of troop immunity from Iraqi law and American authority over military operations, American authorities would have jurisdiction over their troops. Hamoud also said that in case of a major crime such as murder, the case would be reviewed by a U.S.-Iraqi joint committee. The proposal calls for the lifting of immunity for private contractors, who would be subject to Iraqi laws. As for detainee authority, any kind of detention must be ordered by a judge under Iraqi law. Detainees must be delivered to Iraqi authorities within 24 hours of their arrests by both Iraqi and American forces. This would go into effect January 1, when the U.N. mandate outlining the presence of U.S.-led coalition troops expires. Asked to comment on Friday on these remarks, a U.S. Embassy spokeswoman said Rice noted progress toward hammering out a pact. After Rice met with al-Maliki, she and Foreign Minister Hoshyar Zebari briefed reporters. Zebari said both sides were "very close" to finalizing the agreement. Rice said that what had been formulated up to that point was a "very good agreement." She said that the "ultimate goal is to have Iraqi forces responsible for the security of Iraq" and that they agreed to "some goals, some aspirational timetables" for troop withdrawals would be worth for having. "What we're trying to do is to put together an agreement that protects our people, that respects Iraqi sovereignty, that allows us to lay the kind of foundation that we need for making certain that we complete the work that we've all sacrificed so greatly to see accomplished, and that work is being accomplished," she said.