Baghdad, Iraq (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."

Read More