BAGHDAD – With a substantial majority, the Iraqi parliament yesterday ratified a sweeping security agreement that sets the course for an end to the U.S. role in the war and marks the beginning of a new relationship between the countries.

The pact, which still must be approved by Iraq's three-person presidency council, a move expected in the next few days, sets the end of 2011 as the date by which all U.S. troops must leave the country.

Its passage, on a vote of 149-35 according to a parliamentary statement, was a victory for Iraq's government as well as for the often fractious legislative body, which forged a political compromise among bitterly differing factions in 10 days of intense negotiations.

After notable failures on some critical issues, including a law to divide oil revenues and another to determine the future of the disputed city of Kirkuk, the vote yesterday represented a coming of age for the three-year-old parliament.

“This is the day of our sovereignty,” Iraqi Prime Minister Nouri al-Maliki said. “Together we will go forward toward a free, prosperous and glorious Iraq, where Iraqis can live with pride and dignity and can be proud that they are sons of this beloved country.”

Highlights of the pact

The security agreement goes into effect Jan. 1 when the United Nations mandate that governs U.S. troop operations in Iraq expires.

The agreement requires all U.S. combat forces to withdraw from Iraqi cities and towns by June 30, and for all U.S. troops to leave Iraq by Dec. 31, 2011.

The Iraqi government can negotiate a later agreement with the Americans allowing them to stay longer if it believes Iraq is not yet stable enough.

SOURCE: New York Times News Service

The Cabinet approved the final version of the security agreement on Nov. 16. Since then, the government has furiously worked to gain approval of the measure, which goes into effect on Jan. 1 when the United Nations mandate that governs U.S. troop operations in the country expires.

In sharp contrast to the atmosphere during the drafting of Iraq's constitution in 2005, there was relatively little violence on the streets during the parliamentary negotiations, despite intense and sometimes contentious debates.

Within the halls of parliament, Shiite religious clerics in swirling robes and turbans and women in long black abayas huddled in consultation with secular Sunnis and Kurds in tailored suits. There was far less of the intense mutual distrust that defined the discussions three years ago.

President Bush congratulated the parliament on the vote.

“Today's vote affirms the growth of Iraq's democracy and increasing ability to secure itself,” Bush said in a statement. “Two years ago this day seemed unlikely – but the success of the surge and the courage of the Iraqi people set the conditions for these two agreements to be negotiated and approved by the Iraqi parliament.”

The security agreement and an accompanying document that outlines America's relationship with Iraq in areas like economics, health care and education, would grant Iraq considerable authority over U.S. troop operations, requiring court orders to search buildings and detain suspects.

It also sets out a timetable requiring U.S. troops to withdraw from cities and towns by June 30 and for all troops to leave the country by the end of 2011 unless the Iraqis and Americans negotiate a separate pact to extend the U.S. military presence. (In contrast, President-elect Barack Obama campaigned under a promise to withdraw all U.S. combat brigades from Iraq by May 2010, but set no date for a complete withdrawal.)

The agreement commanded broad support, although it remains unclear how the several dozen lawmakers who failed to show up would have voted. There remained vocal opposition from followers of the anti-American Shiite cleric Muqtada al-Sadr and some hard-line Sunni Arabs who disagreed vehemently with the idea of striking a deal with the United States, a country they view as having waged an illegal war.

“America couldn't gain international legitimacy before the war,” said Mohamed al-Dayni, a member of the National Dialogue Front, one of the Sunni parties. “And they didn't have it until a few seconds before the vote, but unfortunately they got it from the Iraqi parliament.”

Nevertheless, the agreement enjoyed broad support across sectarian lines largely because of the insistence of Iraq's pre-eminent religious leader, Grand Ayatollah Ali al-Sistani, who from his modest office in Najaf has reached out to leaders from every faction.

The ayatollah told members of the Iraqi government and legislators that it was not enough just to get the bill through, but that they needed to build a broad national consensus. That meant that the Shiite and Kurdish lawmakers who supported the deal from the outset had to fashion several accompanying measures to satisfy the doubts of a number of wary Sunnis.

Approved yesterday along with the security pact were a nonbinding resolution that included a commitment to address long-standing grievances of minority blocs in the parliament as well as a law requiring a referendum on the pact in July 2009. This resolution explicitly addressed Sunni demands for the enforcement of an amnesty law for thousands of detainees in Iraqi custody and for a greater sectarian balance in the security forces.

Many Sunnis and independents in parliament cited the referendum to justify their support of the agreement. With provincial elections scheduled for the end of January, none of the political parties wanted to be accused of making an unpopular agreement with the Americans, who are widely viewed here as an occupation force.