BAGHDAD — Iraq’s embattled prime minister announced Friday that he will submit his resignation to parliament in hopes of curbing two months of widespread protests that have resulted in the deaths of hundreds of Iraqis.

Prime Minister Adel Abdul Mahdi decided to resign in response to a call Friday by Iraq’s powerful Shiite Muslim religious leader, Grand Ayatollah Ali Sistani, for a change of leadership, according to a statement issued by the prime minister’s office.

The statement said Abdul Mahdi’s resignation aims to “preserve the blood” of Iraqis amid a rising death toll in protests since early October over official corruption, high unemployment and poor government services in the oil-rich nation.

Protesters who gathered in a central Baghdad square welcomed the announcement but said it did not go far enough.

Abdul Mahdi did not specify when he would submit his resignation. Friday marks the start of the weekend in Iraq, and parliament is set to meet Sunday for an emergency session to discuss the ongoing crisis in the country.

In some of the latest protest-related violence, security forces fatally shot seven people Friday in the southern city of Nasiriyah, a local health department official told The Washington Post, speaking on the condition of anonymity because he was not authorized to disclose the information publicly.

The situation was later defused after Abdul Mahdi’s resignation announcement, when local tribal leaders assuaged protesters who were surrounding the city’s police headquarters. The commander of Nasiriyah’s police department resigned Friday, a day after the resignation of the governor of Dhi Qar province, of which Nasiriyah is the capital.

Earlier, the deputy governor of Najaf province also stepped down.

In a statement, influential Shiite cleric Moqtada al-Sadr said Abdul Mahdi’s resignation announcement was only the first of the protest movement’s outcomes.

“Keep in mind that his resignation does not mean the end of corruption,” the cleric said in a statement. He added that a new prime minister should be chosen by voters through a referendum and that the incoming prime minister should select his cabinet ministers independent of sectarian, nationalist or party divisions.

In a statement that began with a Koranic verse about offering oneself up for sacrifice, Abdul Mahdi said his decision came after listening to a sermon Friday from Sistani, Iraq’s “marja,” or supreme Shiite religious authority.

In the sermon, read by a Sistani aide at Friday prayers in the central Iraqi city of Najaf and broadcast nationally, Sistani called on the government to “reconsider its options,” to prevent further bloodshed in the country. He cited tense conditions and a “clear inability” on the part of authorities to deal with the unrest in the past two months.

More than 350 people have been killed in Iraq since the protests shook the country on Oct. 1. Protesters have tried to gain control of central Baghdad and key downtown bridges leading to the seat of government. Security forces have fired live ammunition, rubber bullets and tear gas at the crowds.

The latest surge of violence included an attack on the Iranian Consulate in Najaf, a city that is sacred to Shiite Muslims and where Sistani resides. Blockades of burning tires cut off parts of the city about 100 miles south of Baghdad.

In the capital, marchers tried to hold bridges leading to the fortified Green Zone, the site of many government offices and diplomatic missions, including the U.S. Embassy. Later on Friday, a rocket landed on the edge of the Green Zone, but there were no casualties, according to the Iraqi joint operations command.

Iraq’s constitution does not spell out a process that follows the resignation of a prime minister, said Zaid Al-Ali, a lawyer specializing in comparative constitutional law and international commercial arbitration.

Iraq’s Federal Supreme Court can decide that a resignation equates to a vacancy, Ali said, which constitutionally means that the president of Iraq temporarily fills the role of prime minister.

“But in Iraq, according to the conditions and our history in the last 15 years, ‘temporary’ conditions may remain for a long time,” Ali said. If Abdul Mahdi asks parliament to withdraw its confidence in him and it complies, effectively forcing him to resign, the whole government has to change. Abdul Mahdi would take the role of caretaker prime minister in the meantime.

Earlier in the day, palpable grief was etched on the faces of protesters in Baghdad’s central Tahrir Square mourning people killed Thursday. But shouts and cries flooded the square when Abdul Mahdi’s statement was announced over loudspeakers.

A speaker at the demonstration congratulated people on the news but urged them not to leave the square. Protesters did not gather there only for Abdul Mahdi’s resignation, the speaker said, adding, “We want to bring down the regime.”

Arms waving and shoulders swaying, lines of men danced in the exposed facade of an abandoned building known as the Turkish Restaurant, where they have set up a command center overlooking Tahrir Square.

“We welcomed this news with hearts heavy over the souls of the martyrs,” said Ali Dabdab, a protester who has been in the square since the first day. “I wanted them to be with us. The joy is not complete because martyrs of Nasiriyah and Najaf were just buried. Their blood is still red.”

Dabdab, 28, said that the resignation announcement was not enough and that Abdul Mahdi should be put on trial and held responsible for the hundreds killed in the past two months.

“We want to change everything: all these thieves and faces,” he said. “This resignation is only step one, but it’s not what we came for. We want our country back.”

One woman draped in an Iraqi flag hugged friends and strangers alike, tears streaming down her face. “We've been waiting for this day to come,” said Reema al-Obaidi, 25. “This is what tears of joy look like.”

Dadouch reported from Beirut. William Branigin in Washington contributed to this report.