As protesters seek drastic political reforms, it remains unclear whether the unrest will end with the prime minister's resignation.
Protesters in Baghdad's Tahrir Square cheered after Abdul Mahdi said he would submit his resignation to Parliament. Abdul-Mahdi was appointed prime minister just over a year ago as a consensus candidate between political blocs.
Grand Ayatollah Ali Al Sistani earlier urged parliament to considering withdrawing its support for Abdul Mahdi's government to stem spiralling violence.
Al Jazeera's Simona Foltyn, reporting from Baghdad, said while Abdul Mahdi has sent his resignation letter to the parliament, it remains unclear whether in the upcoming parliamentary session lawmakers would vote on the resignation or hold a vote of no confidence.
The unrest, which has killed more than 400 people, mostly demonstrators, amounts to the biggest crisis confronting Iraq since Islamic State insurgents seized vast swathes of Iraqi and Syrian territory in 2014.
"We did our best to stop the bloodshed, and at the time we made courageous decisions to stop using live ammunition, but unfortunately when clashes happen there will be consequences", he said.
Security and medical officials say five protestors were killed and 32 wounded late today when security forces fired live rounds to repel them from setting alight a central mosque in Najaf.
Security forces have used live ammunition, tear gas and stun grenades against mostly unarmed protesters.
Al-Sistani, who outside of times of crisis maintains distance from politics and is considered a proponent of an independent Iraq, has repeatedly called on protesters to remain peaceful and security forces to refrain from violence.
Get The Brief. Sign up to receive the top stories you need to know right now..
Sistani's statements were clear, leaving no choice for the government and the parliament but to give in to the protesters' and Sistani's demands.
"But unfortunately, these events took place", he said, referring to the mass protest movement that engulfed Iraq on October 1.
Over two days, 42 people were shot dead in Nasiriyah, 22 in Najaf and three in Baghdad.
But reality soon caught up as he faced a raft of challenges including high unemployment, widespread corruption and dilapidated public services.
They also criticized Iran's influence.
It followed the storming and burning of the Iran's consulate in the holy city of Najaf on Wednesday. "The global community must speak loudly and clearly, pressing for Iraq to rein in the security forces and launch effective and impartial investigations aimed at bringing to justice those responsible for unlawful killings and other serious violations".