BAGHDAD, Iraq (CNN) -- Iraq's parliament has wrapped up debate on a proposed security pact between the United States and Baghdad and is expected to vote on the heavily protested deal by midweek.
An agreement would leave Iraq's security entirely in the hands of Iraqis by the end of 2011.
Supporters and opponents of the proposed deal expressed their views to members of parliament on Saturday.
The pact, reached after months of negotiations between Iraqi and U.S. representatives, sets June 30, 2009, as the deadline for U.S. combat troops to withdraw from all Iraqi cities and towns. The date for all U.S. troops to leave Iraq altogether would be December 31, 2011.
The agreement would replace a United Nations resolution expiring at year's end that sets out the role of U.S. and allied troops in Iraq. The Iraqi government approved the pact last Sunday, sending the measure into debate in parliament.
If the political blocs reach an agreement on whether to accept the deal, a vote would take place Wednesday or Thursday, Speaker Mahmoud al-Mashhadani said in a statement on the parliamentary Web site.
The parliament met Saturday a day after angry protesters took to the streets to demonstrate against the deal.
Thousands of people -- most of them backers of anti-American Shiite cleric Muqtada al-Sadr -- streamed into Baghdad's Firdous Square waving Iraqi flags, hoisting posters with portraits of the cleric and carrying signs protesting the agreement.
The Sadrists have long been in the forefront of opposition to the deal, and others -- such as Sunni Arabs and secularists -- have expressed reservations and opposition to the pact.
The Sadrists oppose any agreement with the United States and want U.S. forces to leave immediately. They have been protesting the security pact for months in Baghdad's Sadr City, where the cleric has strong support.