Iraqi President Barham Salih promised the resignation of his Prime Minister, Adel Abdul Mahdi, if his departure did not leave a "constitutional vacuum" and a replacement was found.
In an televised address to the nation, Mr Salih said Mr Abdul Mahdi had agreed to submit his resignation.
"The prime minister had previously agreed to submit his resignation if the blocs agree on an acceptable replacement in order to adhere to constitutional and legal frameworks," he said.
Mr Salih said he would welcome an early election but only after reforms to the electoral system and a national dialogue to improve how the country is governed.
His speech responded to a month of protests in Iraq's south, in which up to 250 people had been killed.
Protesters refuse to back down, even though they said security forces were being heavy-handed and violent.
The president, elected only a year ago, also called for those responsible for violence against mostly young demonstrators to be tried, but warned against creating a security void.
A parliamentary shake-up including the replacement of the defence and foreign ministers did little to satisfy demonstrators this month, who are calling for an end to corruption and the provision of basic services such as water and electricity.
Meanwhile, reports emerged that Iran's top general, Qassem Soleimani, took Mr Abdul Mahdi's place chairing a meeting with Iraqi security officials shortly after the protests began.
The day after anti-government protests erupted on October 1, Gen Soleimani, head of the Iranian Islamic Revolutionary Guard Corps' foreign operations arm the Quds Force, flew into Baghdad late at night.
He took a helicopter to the heavily fortified Green Zone, where he surprised a group of top security officials by chairing the meeting, Reuters reported.
“We in Iran know how to deal with protests,” Gen Soleimani told the Iraqi officials, two senior officials said. “This happened in Iran and we got it under control.”