(CNN) Iraqi Prime Minister Adil Abdul Mahdi has agreed to resign after weeks of anti-government protests that led to hundreds of casualties, Iraq's president announced Thursday.
In a televised speech to the nation on Iraq's Al-Iraqiya TV, President Barham Salih said Abdul Mahdi had agreed to step down on the condition that a successor is agreed to replace him.
"The prime minister has agreed to resign," Salih said, adding that Abdul Mahdi had asked "political blocs to reach an acceptable alternative" in order "to prevent a vacuum."
One of Iraq's leading Shiite clerics and most powerful politicians, Muqtada al-Sadr, had called on other parties Tuesday to back his push for a no-confidence vote in Abdul Mahdi.
The protests, which have gripped parts of Iraq for the past month, were sparked by longstanding complaints over unemployment, government corruption, and a lack of basic services -- such as electricity and clean water.
Many Iraqis blame the current political parties in power for their economic hardship and the scale of the protests, believed to be the biggest since the fall of Saddam Hussein in 2003, took the government by surprise.
Officials have attempted to regain control with the use of lethal force, while also imposing curfews and internet blackouts. The government said it only shoots when attacked, but those who have taken part in the demonstrations have disputed that.
More than 200 protestors have been killed, and thousands injured, since the protests began earlier this month.
Another wave of protests broke out in the capital Baghdad on Wednesday, made up of protesters from across the country's ethnic and sectarian divides, Reuters reported.
The demonstrations turned violent at nightfall, and protestors attempted to storm a bridge leading to the heavily fortified Green Zone, Reuters reported.
The Green Zone includes the US embassy along with other foreign embassies, the Iraqi parliament building and other government buildings.
That day, a rocket landed 100 meters from the US embassy, killing an Iraqi soldier and wounding another, a senior Iraqi military officer told CNN.
Iraqi security forces are investigating the incident and trying to determine the launching point of the rocket.
On Thursday, the United Nations appealed for a national dialogue to ease the widespread anger.
"Democracy has given Iraqis the right to have their voices heard and to hold their leaders to account," Jeanine Hennis-Plasschaert, the Special Representative of the United Nations Secretary-General for Iraq, said in a statement.
"Today Iraq stands at a crossroads. Progress through dialogue, or divisive inaction. Violence only breeds more violence. A public national dialogue can bring Iraqis together to draw a roadmap towards a more inclusive, stable and prosperous Iraq."