Iraq's parliament on Thursday approved a security pact with the United States that lets American troops stay in Iraq for three more years.

By a simple majority of 149 out of 198 members present, the Iraqi parliament voted in favor of the pact, FOX News reported. It was backed by the ruling coalition's Shiite and Kurdish blocs as well as the largest Sunni Arab bloc, which had demanded concessions for supporting the deal.

There are 275 members of the Iraqi parliament.

The Prime Minister Nouri al-Maliki appeared to have won the comfortable majority that he sought in order to give the agreement additional legitimacy.

Parliament speaker Mahmoud al-Mashhadani said an "overwhelming majority" of the lawmakers who attended the session voted in favor of the pact by a show of hands.

The vote was considered a big test for the agreement and the Presidential Council is expected to ratify it.

"The Strategic Framework Agreement sets the foundation for a long-term bilateral relationship between our two countries, and the Security Agreement addresses our presence, activities, and withdrawal from Iraq," said President George W. Bush in a statement on Thursday.

"Today's vote affirms the growth of Iraq's democracy and increasing ability to secure itself. We look forward to a swift approval by Iraq’s Presidency Council," Bush said.

"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 improved conditions on the ground and the parliamentary approval of these two agreements serve as a testament to the Iraqi, Coalition, and American men and women, both military and civilian, who paved the way for this day."

Senate Republican Mitch McConnell also praised the security pact.

"The Iraqi parliament's action on this agreement represents an important milestone, and one that seemed nearly impossible when the Petraeus plan was announced at the beginning of this Congress. The Surge protected the Iraqi population, reduced violence and allowed political leaders to reconcile," McConnel said in a statement on Thursday.

"The U.S.-Iraq agreement preserves Americas national interest while shielding American troops serving overseas. And it will allow American troops to come home in success, while leaving Iraq a more stable nation and ally-rather than leaving in defeat, as some proposed in past years, with Iraq in deadly chaos,' he said.

The parliment also approved by a majority vote a number of political reforms that had been negotiated by the parties to get the pact approved.

A bloc of 30 lawmakers loyal to anti-American Shiite cleric Muqtada al-Sadr, who opposed the pact, chanted protests and hoisted banners that said "No, no to the agreement" during the 25-minute session.

Under the deal, U.S. forces will withdraw from Iraqi cities by June 30 and the entire country by Jan. 1, 2012. Iraq will have strict oversight over U.S. forces.

The security pact meets an Iraqi goal of a clear timetable for the departure of American forces and has been described by al-Maliki as a path toward full sovereignty for Iraq.

The vote had been delayed by one day because of sectarian-based disputes and power struggles among the political factions, which have hampered reconciliation efforts after years of war.

The Shiite and Kurdish blocs agreed to a Sunni demand that a national referendum on the pact be held by July 30. A vote against the pact at that time could torpedo the deal.

But the Sunnis did not get two concessions: the repeal of a law designed to weed out former members of Saddam Hussein's Baath party, and the dissolution of a special court that tried the dictator and top officials of his regime. Saddam was sentenced to death and executed in 2006.

Iraq's Shiites and Kurds, who comprise about 80 percent of Iraq's 27 million people, were the target of massacres and other atrocities under Saddam's Sunni-dominated regime. Grievances run deep, and caving in to Sunni demands on the special court and the Baathist law could have produced voter backlash ahead of provincial and general elections in 2009.

The Associated Press contributed to this report.