Iraqi and U.S. officials said several difficult issues remain, including whether U.S. troops will be subject to Iraqi law if accused of committing crimes. But the officials, speaking on the condition of anonymity because they were unauthorized to discuss the agreement publicly, said key elements of a timetable for troop withdrawal once resisted by President Bush had been reached.
"We have a text," Iraqi Foreign Minister Hoshyar Zebari said after a day-long visit Thursday by U.S. Secretary of State Condoleezza Rice.
Rice and Iraqi Prime Minister Nouri al-Maliki spent nearly three hours here discussing key undecided issues. The accord must be completed and approved by both governments before a United Nations mandate expires at the end of the year.
The question of immunity for U.S. troops and Defense Department personnel from Iraqi legal jurisdiction -- demanded by Washington and rejected by Baghdad -- remained unresolved. Troop immunity, one U.S. official said, "is the red line for us." Officials said they were still discussing language that would make the distinction between on- and off-duty activities, with provisions allowing for some measure of Iraqi legal jurisdiction over soldiers accused of committing crimes while off-duty.
But negotiators made progress on a specific timetable outlining the departure of U.S. forces from Iraq, something Maliki is under considerable domestic political pressure to secure. In the past, Rice and other U.S. officials have spoken of an "aspirational time horizon" that would make withdrawals contingent on the continuation of improved security conditions and the capabilities of Iraqi security forces.
Officials on both sides have said they hope to split the difference, setting next year as the goal for Iraqi forces to take the lead in security operations in all 18 provinces, including Baghdad.
U.S. and Iraqi negotiators have now also agreed to a conditions-based withdrawal of U.S. combat troops by the end of 2011, a date further in the future than the Iraqis initially wanted. The deal would leave tens of thousands of U.S. troops inside Iraq in supporting roles, such as military trainers, for an unspecified time. According to the U.S. military, there are 144,000 U.S. troops in Iraq, most of whom are playing a combat role.
Negotiators agreed several weeks ago to reduce the presence of all U.S. forces in Iraqi cities, among the most dangerous places soldiers operate, by the end of next year. That process would entail consolidating U.S. troops now deployed in small neighborhood posts into larger bases outside city centers, according to U.S. and Iraqi officials involved in the talks.
"They have both agreed to 2011," Mohammed al-Haj Hamoud, Iraq's chief negotiator, said in a telephone interview. "If the Iraqi government at that time decides it is necessary to keep the American forces longer, they can do so."
The fragile nature of security gains over the past year was evident in the secrecy surrounding Rice's one-day visit here, which was not announced until her arrival from Incirlik Air Base in Turkey. U.S. negotiators hoped that her participation in direct talks with Maliki and visits with the Shiite and Sunni vice presidents would help conclude the immunity and timeline discussions.
"What my presence can do is to identify any final obstacles," Rice said Thursday as she began the Baghdad leg of a trip that has included a NATO meeting in Brussels on the crisis in Georgia and a stop in Warsaw to sign an agreement to station parts of a missile-defense system in Poland.
"It's a chance for me to sit with the prime minister and really get a sense of if there is anything else we need to do from Washington to get to closure" on the Iraq security accord. At a joint news conference before her departure, Rice and Zebari said that significant progress had been made. "We are working together as partners to make sure we cover the concerns of both," she said.
The United States, Zebari said, had shown "a great deal of understanding" and flexibility in response to Iraqi concerns. The issues were "sensitive," he said, and "that's why it takes a long time."
"We think this is a very good agreement," Rice said, adding that "the United States has gone very far" in accommodating Iraqi issues. She then noted that some obstacles remain, saying it would be an "excellent agreement when we finally have agreement."
Shortly after negotiations began in March, Iraq rejected an initial U.S. draft, which Maliki later publicly branded a "dead end." The draft called for immunity for both troops and U.S. civilian contractors, as well as unilateral U.S. control over its military operations and detention of Iraqi citizens. It did not include a timetable for U.S. troop withdrawal.
With talks at a stalemate and time growing short, the two sides scaled back hopes of reaching a full status-of-forces agreement of the type that outlines the rights and responsibilities of U.S. forces in more than 80 countries around the world. In early June, after President Bush instructed U.S. negotiators to be more flexible on Iraq's key concerns, compromises were reached on military operations and detainees, and the United States abandoned its immunity demand for contractors.
Last month, Maliki said that the end of 2010 would be a reasonable goal for the withdrawal of U.S. combat troops.
Facing challenges from within his own majority Shiite group, as well as from minority Sunnis and Kurds, Maliki pledged that there would be no "secret deals" with the United States. He said the agreement would be put to a vote in Iraq's fractious parliament.
"Time is of the essence," Zebari said at the news conference. "We are redoubling our efforts" to conclude the deal in time for it to be signed by Maliki and Bush before the U.N. mandate expires on Dec. 31, he said.
Without a formal, bilateral agreement, there is no international legal basis for U.S. forces to remain here.
The first Iraqi political test will come Friday, Zebari said in a conversation with reporters after the news conference, when Maliki's executive council will examine the parts of the text that negotiators have agreed to, as well as proposals to deal with immunity and other issues. "Tomorrow is a very important day," Zebari said.
The next step is consideration by a larger council of representatives from the leading political blocs. Then the document will be submitted to parliament, which is in summer recess until Sept. 9.
The Muslim holy month of Ramadan, when all business slows amid fasting, also falls in September.
U.S. negotiators have told Iraqi officials that a change in U.S. policy in Iraq could come when a new president takes office in January. The Republican candidate, Sen. John McCain (Ariz.), has said he will continue current policy. His Democratic opponent, Sen. Barack Obama (Ill.), has said he will begin an immediate withdrawal of U.S. combat forces, to be completed within 16 months.