Iraq's parliament speaker has ended the debate on the proposed Iraq-U.S. security agreement and set Wednesday for a vote on the deal that will allow U.S. troops to stay in Iraq for three more years.

Speaker Mahmoud al-Mashhadani says the vote can be held earlier if the legislature's main blocs agree on the pact before Wednesday. The decision Saturday followed a six-hour debate in which some two dozen lawmakers spoke.

Prime Minister Nouri al-Maliki has said he wanted the deal approved by consensus, and the country's most influential cleric has indicated the deal would be acceptable only if it wins by a big majority.