Abdul Mahdi submitted his letter of resignation to parliament on Saturday after an uptick in bloody violence that witnessed the deaths of almost 70 demonstrators.
Protests erupted in the capital Baghdad and across Iraq's Shia-majority south in early October against endemic corruption, economic mismanagement and poor public services, since growing to demand the ousting of the government accused of being beholden to foreign powers.
Most Sunni-majority areas of the country have refrained from protesting, fearing that opposing the Shia-dominated central government would earn them the labels of being "terrorists" or supporters of former dictator Saddam Hussein.
But this week's bloody crackdown on protesters following the torching of the Iranian consulate in Najaf has prompted Iraqis in nearly all of the country's provinces to turn out in solidarity.
Hundreds of students dressed in black organised a mourning march in the northern city of Mosul on Sunday, AFP reported.
"It's the least Mosul can give to the martyrs of Dhi Qar and Najaf," said Zahraa Ahmed, a dentistry student, naming the two southern provinces where most recent victims were from.
"The protesters are asking for their basic rights so the government should have answered from the beginning."
Another student, Hussein Kheder, carrying an Iraqi flag, said the whole country was now on the same page politically.
"Now the government needs to answer to the protesters' demands," he told AFP.
For three years, Mosul was the heart of the Islamic State group's extremist "caliphate", and much of it still lies in ruins today.
Demonstrators, including teachers and students, also donned black to mourn the deaths in the southern port city of Basra, AP reported.
In Salahaddin, another northern Sunni province where no rallies had taken place so far, authorities had already declared on Friday three days of mourning for the victims.
Demonstrations were also reported in Fallujah and Ramadi, both in the Sunni-majority Al-Anbar province.
Eight other Shia-majority provinces announced on Sunday a mourning day during which government offices would remain shut.
Iraq in flames
Demonstrators in Dhi Qar set fire on Sunday to the home of a military commander tasked with handling security in the province, Turkish state news agency Anadolu reported.
"Hundreds of demonstrators burned the house of Jameel al-Shimmary," a local police source said.
Shimmary was appointed last week before being fired for the deaths of 35 protesters in the province this week.
Demonstrators also set fire to the entrance of a shrine in the holy city of Najaf on Saturday evening, risking further bloody reprisals just days after the torching of the city's Iranian consulate led to the deaths of dozens.
In a video shared with Reuters by a protester, demonstrators are seen filming the burning entrance to the Mohammed Baqir al-Hakim shrine and cheering.
Hakim was a Shia Muslim cleric and leader of the Iran-backed Supreme Council for the Islamic Revolution in Iraq.
Reuters said it could not verify the footage.
Read more: Kidnappings, killings and threats: Inside Iraq's authoritarian turn
Najaf, the seat of Iraq's Shia Muslim clergy, is considered the third holiest city in the world to Shia Muslims and is a thriving center for pilgrimage, alongside Karbala.
More than 20 demonstrators were killed in Najaf this week, with at least 31 more killed by security forces in the southern city of Nasiriyah, the birthplace of Prime Minister Adel Abdul Mahdi.
The protest hotspot was calm on Sunday after three consecutive days of violence, an AFP correspondent reported.
More than 420 people killed and 15,000 wounded so far, according to an AFP tally.
This article has been adapted from its original source.