Iraqi Prime Minister Adel Abdul-Mahdi resigned Friday in the wake of bloody protests that killed more than 40 people a day earlier, the bloodiest day of protests since they began Oct. 1.

Nearly 400 people have been killed since demonstrators began demanding the government do something about unemployment, end corruption and improve public services. On Thursday, 40 people were shot to death during protests in Baghdad, Najaf and Nasiriyah. At least three more protesters were shot and killed Friday. The curfew in Nasiriyah was lifted to accommodate funerals.

The announcement triggered celebrations by anti-government forces in Tahrir Square in Baghdad although no effective date was given. Parliament has scheduled an emergency session for Sunday.

Abdul-Mahdi’s decision came after prominent clerics withdrew support. Grand Ayatollah Ali al-Sistani said in his Friday sermon the government should “reconsider its options,” a sign he was withdrawing his support, and labeled attacks on peaceful protesters “forbidden.” He called on protesters to eject violent elements from their ranks.

Prominent cleric Ammar al-Hakim said the government should meet protester demands, who also are seeking the removal of the ruling class that has controlled the country since the ouster of Saddam Hussein in 2003.

"We will not stop with the prime minister, we still have more fighting to do. We will push forward until our demands are met," one protester, who would not give her name, told the Associated Press.

U.N. Secretary-General Antonio Guterres called on security forces to exercise restraint.

"I will submit to Parliament an official memorandum resigning from the current prime ministry so that the Parliament can review its choices,” said Abdul-Mahdi, who has served as prime minister for 13 months. He was a consensus candidate and the first elected prime minister from outside the Dawa party in a dozen years.

Abdul-Mahdi fired the country’s military director, Gen. Jamil Schummary, Thursday in a bid to restore order.

Iraqi demonstrators gather as flames start consuming Iran's consulate in the southern Iraqi Shiite holy city of Najaf on November 27, 2019
Iraqi demonstrators gather as flames start consuming Iran's consulate in the southern Iraqi Shiite holy city of Najaf on November 27, 2019 AFP /