For more than a year after he was first appointed Iraqi Foreign Minister in 2003, Hoshyar Zebari recalls, he was routinely stopped by junior American soldiers saying that he was not authorized to enter the Green Zone. "I'm the foreign minister!" he would tell them.
Thursday, as he prepared to celebrate Parliament's passage of an agreement that essentially transforms the US role from one of occupier to invited guest, he sees progress. "We've come a long, long way," says Mr. Zebari.
The historic pact, passed by 149 of Iraq's 275 parliamentarians, calls for America's 140,000 troops to pull back to bases outside Iraq's cities by next June and leave the country entirely within three years. But it also mandates a public referendum on the deal next July. If Iraqis reject it, US forces could be asked to leave much sooner than 2011.
The US and Iraq began negotiations more than a year ago on the so-called Status of Forces Agreement as well as a broader strategic framework governing US-Iraqi relations. With an insurgency still raging in parts of the country, the United States felt it had enough leverage to continue to demand unprecedented powers. Under rules imposed in 2003, for example, Iraq was the only country in the world where US contractors were exempt from local laws, US officials said.
A year of tough negotiations with an increasingly confident Iraqi government resulted in an agreement more in line with security pacts with other countries. Now, Iraq may prosecute coalition contractors and soldiers for crimes committed off-base and off-duty. It also must approve U.S. military operations.
"This points us to a future more toward sovereignty, independence, and national political will," says Zebari, who was the chief negotiator of the pact.
Thursday's agreement replaces UN Security Council authorization for the US presence here, which has been renewed at Iraq's request every year since after former President Saddam Hussein was toppled in the 2003 US invasion. When the current mandate ends Dec. 31, Iraq will no longer officially be considered a threat to international peace and security for the first time since Iraq invaded Kuwait in 1990.
The debate in parliament over the past week shined a spotlight on Iraq's boisterous, burgeoning democracy, forged against the backdrop of continuing violence and the destruction wrought by five years of war. It also highlighted fractures in Prime Minister Nouri al-Malaki's governing coalition.
One of the sessions ended with some lawmakers fleeing the chamber as a member of the political bloc loyal to Shiite cleric Moqtada al-Sadr tussled with one of the foreign minister's Kurdish bodyguards. On Thursday, members of the Sadr bloc, which oppose any agreement with the US and boycotted the vote, tried to disrupt the proceedings by banging on desks and chanting "No, no to the occupiers."
"I'm not happy about all the practices of all our parliament or discipline or commitment or see the value of what they are doing, but on this issue I think it shows to other countries that there is real freedom in Iraq, of speech, of expression … people feeling that they have a role in deciding the future of this country, " says Zebari.
The agreement was ratified by Prime Minister Malaki's cabinet earlier this month, but needed the approval of a simple majority of the 275-member cabinet. It was held up by a last-minute demand by Sunni parties, backed by Kurdish and some Shiite lawmakers, for a series of political reforms.
"This is one of the most important votes we've ever taken on Iraq's future," says Ali Maki, of the Iraqi Islamic Party, which is part of the major Sunni bloc that pressed for concessions from the Shiite-led government in exchange for its support.
The bill passed – on the eve of the departure of dozens of lawmakers for the Haj, the Muslim pilgrimage to Mecca – after it was tied to a political reform package and the call for a public referendum.
While the agreement sets clear limits on the US ability to carry out operations without consulting Iraqi authorities, exactly how that will work will be determined by a series of committees which will begin work on January 1.
In practical terms, the agreement will initially cover ongoing counterinsurgency operations and transition to peacetime operations, such as joint maneuvers. It also governs areas as detailed as the right to enter the country without visas, imports and exports of equipment, use of the radio spectrum, and overflight rights.
The wider strategic framework agreement is meant to map out the wider bilateral relationship with the US, including economic and political accords.
"What does the United States want? It wants a stable country that is open to investment and is open to ideas and is developing in a way that helps its people and help the region. These agreements provide the basis for that," says the US Embassy spokesman, Ambassador Adam Ereli.
While officials were celebrating the agreement's passage, they emphasized that it wouldn't take real shape until the details were hammered out.
"The real work will start now to form all these committees for the first week in January," says Zebari.
Officials have been bracing for violence that was threatened if the agreement passed. Iraqi soldiers, paramilitary, and police were out in full force on the streets of Baghdad, where there are still explosions almost every day.
Iraqi security forces have generally welcomed the help of American troops, but would like to see them leave as soon as possible.
"This agreement is good for us," says a young national policeman, manning a checkpoint as a convoy of wedding vehicles draped in ribbons and plastic flowers drove past, while relatives of the bride and groom sang and danced.