BERLIN, GERMANY - APRIL 30:  Iraqi Prime Minister Adil Abdul-Mahdi reviews a guard of honor upon Abdul-Mahdi
BERLIN, GERMANY - APRIL 30: Iraqi Prime Minister Adil Abdul-Mahdi reviews a guard of honor upon Abdul-Mahdi's arrival at the Chancellery on April 30, 2019 in Berlin, Germany. This is Andul-Mahdi's first official visit to Germany since he became prime minister in 2018. (Photo by Michele Tantussi/Getty Images)
PHOTO: Michele Tantussi/Getty Images
Now playing
03:05
Iraqi Prime Minister Adil Abdul Mahdi says he will resign
PHOTO: CNN
Now playing
02:27
Young Russians emboldened to speak up against Putin
protests russia alexey navalny putin response chance pkg vpx_00022522.png
protests russia alexey navalny putin response chance pkg vpx_00022522.png
Now playing
03:19
Kremlin tries to blame US for massive Russian protests
Now playing
01:01
Watch London police break up an illegal rave
Russia protests Alexey Navalny Putin Pleitgen pkg vpx _00015627.png
Russia protests Alexey Navalny Putin Pleitgen pkg vpx _00015627.png
PHOTO: Reuters
Now playing
02:19
Thousands turn out across Russia to protest Navalny's arrest
PHOTO: FBK
Now playing
02:52
Kremlin critic's investigation into Putin is going viral in Russia
libya russian backed mercenaries wagner investigation npw pkg intl ldn vpx_00001519.png
libya russian backed mercenaries wagner investigation npw pkg intl ldn vpx_00001519.png
Now playing
02:27
Images show huge trench being dug by Russian-backed mercenaries
screengrab who independent panel
screengrab who independent panel
PHOTO: EBS+ News
Now playing
02:34
WHO and China criticized for slow Covid-19 responses
Iraqi security forces keep guard the site of a suicide attack in Baghdad, Iraq January 21, 2021. REUTERS/Thaier al-Sudani
Iraqi security forces keep guard the site of a suicide attack in Baghdad, Iraq January 21, 2021. REUTERS/Thaier al-Sudani
PHOTO: Thaier al-Sudani/Reuters
Now playing
02:42
Dozens killed and hundreds injured in Baghdad suicide blasts
PHOTO: Policia Nacional via Reters
Now playing
00:53
See the aftermath of the Madrid explosion
PHOTO: Alexey Navalny
Now playing
02:35
Navalny urges his supporters to hit the streets
TOPSHOT - Russian President Vladimir Putin crosses himself as he plunges into the icy waters during the celebration of the Epiphany holiday in Moscow region on January 19, 2021. (Photo by Mikhail KLIMENTYEV / SPUTNIK / AFP) (Photo by MIKHAIL KLIMENTYEV/SPUTNIK/AFP via Getty Images)
TOPSHOT - Russian President Vladimir Putin crosses himself as he plunges into the icy waters during the celebration of the Epiphany holiday in Moscow region on January 19, 2021. (Photo by Mikhail KLIMENTYEV / SPUTNIK / AFP) (Photo by MIKHAIL KLIMENTYEV/SPUTNIK/AFP via Getty Images)
PHOTO: MIKHAIL KLIMENTYEV/SPUTNIK/AFP/Getty Images
Now playing
00:36
See Putin take part in traditional icy Epiphany dip
guatemala honduras migrants tear gas Oppmann intl ldn vpx_00000604.png
guatemala honduras migrants tear gas Oppmann intl ldn vpx_00000604.png
PHOTO: CNNE
Now playing
01:30
Authorities use tear gas and batons against US-bound migrants
PHOTO: Getty Images
Now playing
04:21
Here's where the UK-US special relationship could go under Biden
PHOTO: Getty Images
Now playing
02:41
Alexey Navalny arrested on his return to Moscow
(CNN) —  

Iraqi Prime Minister Adil Abdul Mahdi will resign after nearly two months of anti-government protests, according to a statement from his office.

People set off fireworks as they celebrated his resignation in Baghdad’s Tahrir Square, after anti-government protests, which began on October 1, swept through the country against alleged government corruption and Iranian involvement in the country’s affairs.

In the statement, Abdul Mahdi said he would submit a resignation request to parliament “to consider its options, with the knowledge that those near and far are aware that I had already made this decision known.”

He called on Iraq’s government to “act in the interests of Iraq; to preserve the blood of its people; and to avoid slipping into a cycle of violence, chaos and devastation.”

Abdul Mahdi said his resignation was in response to the Friday sermon of Iraq’s top Shiite cleric, Grand Ayatollah Ali al-Sistani, who referenced the “failure of respective agencies to handle developments over the past two months.”

Abdul Mahdi had initially agreed to resign on October 31 on the condition that a successor was agreed to replace him.

Days of violence

The news comes after the Iranian consulate in the southern city of Najaf was attacked on Wednesday. Mahdi ordered an investigation on Thursday into the deaths of at least 31 people.

More than 1,000 people were injured over three days of demonstrations across Iraq from November 26 to November 28, the country’s Independent High Commission for Human Rights said Thursday.

In total, around 380 people have been killed and 17,745 injured in Iraq since the protests began, according to Ali Al-Bayati, a member of the Independent High Commission for Human Rights of Iraq. Protesters have demanded the government step down and hold early elections under direct supervision of the United Nations, activists told CNN.

Many Iraqis blame the current political parties in power for their economic hardship.

Officials have imposed curfews, internet blackouts, and deployed lethal force in attempts to quash the protests. The government said it only shoots when attacked, but demonstrators have disputed that.