Thousands attended angry protests in Baghdad and southern Iraq on Saturday, grieving but defiant after more than 20 demonstrators were killed in an attack the previous day.

Thousands attended angry protests in Baghdad and southern Iraq on Saturday, grieving but defiant after over 20 were killed in an attack the previous day that demonstrators described as "slaughter".

The protest movement faced another worrying turn on Saturday after an armed drone targeted the home of Iraqi cleric Moqtada Sadr, an attack his office said could lead to "civil war."

The dramatic developments have threatened to derail the anti-government rallies rocking Iraq since October, the largest and deadliest grassroots movement in decades.

Late Friday, at least 20 protesters were killed or sustained wounds that later proved fatal, while dozens more were injured, when unidentified gunmen attacked a large building where protesters had camped out for weeks, medics said.

Four police officers also died, the medics said, with witnesses saying gunshots were fired in the dark from atop the building towards Al-Sinek, where security forces are stationed.

The toll rose throughout the day on Saturday as wounded demonstrators and police officers died in hospital.

The violence pushed the protest toll past 450 dead and to nearly 20,000 wounded

The violence pushed the protest toll past 450 dead and to nearly 20,000 wounded, according to an AFP tally compiled from medics, police and a national rights commission.

Under stormy skies, young men in central Baghdad prayed over an Iraqi flag to mourn those who died the previous night, sobbing heavily.

Small clusters of protesters stood near the charred parking complex that was attacked, as larger crowds flocked to nearby Tahrir Square.

"They fired intensely, mercilessly on the protesters," one witness told AFP. "They wouldn't let us evacuate the wounded. It was slaughter."

'Civil war'

As night fell on Saturday, protesters feared the same scene would play out again.

"The same type of men who came in last night are back and police are not stopping them," one worried demonstrator told AFP.

Protesters had suspected their movement's legitimacy would be smeared or pushed towards chaos and were particularly wary of any partisan support.

After Friday's attack, large crowds headed to Tahrir in solidarity - many of them apparently members of Saraya al-Salam (Peace Brigades), headed by Sadr.

The notoriously versatile cleric was one of the main sponsors of the current government but then backed the protests.

He sent his followers into the streets after Friday's attack "to protect protesters," a Saraya source told AFP.

They wouldn't let us evacuate the wounded. It was slaughter

But just a few hours later, Sadr's home in the shrine city of Najaf was hit by an apparent mortar round dropped by a drone, sources from his party told AFP.

"Only the external wall was damaged," one of them said, adding that Sadr was currently in Iran.

Dozens of his supporters flocked to his home on Saturday to show support, waving Iraqi flags and the cleric's picture while chanting, "We are all your soldiers!"

"This is a clear attack that could kindle a war -- maybe a civil war -- in Iraq. Self-restraint is essential," Sadr's spokesman Salah al-Obeidi told AFP.

Lawmakers from Sadr's Saeroon, which make up the largest bloc in parliament, called for an emergency session over Friday's violence.

The tensions continued into Saturday, when truckloads of armed men briefly blocked a main road near Tahrir, firing their weapons and shouting, witnesses said.

Army units then deployed on the street.

Further south in Nasiriyah, the usual rallies swelled with crowds also upset over the previous night's developments, an AFP correspondent said.

"We are coming in solidarity with Baghdad," one said.

'An atrocity'

In Diwaniyah, another protest hotspot, thousands turned out early on Saturday but security forces, too, deployed in larger numbers.

In the first comment on the Friday incident from a senior official, President Barham Saleh called on authorities to "identify the criminals and bring them to justice".

The Kurdistan region's president later described the deaths as "unjustified crimes" and said they were "unacceptable."

The United Nations said "acts of violence that are gang-driven, arising from external loyalties, politically motivated or intended to settle scores, risk placing Iraq on a dangerous trajectory,"

Amnesty International said the attack "raises serious questions as to how heavily-armed gunmen in a fleet of vehicles were seemingly able to pass through Baghdad's checkpoints and inflict such a bloody onslaught."

The country has a complex security apparatus including the military, various police forces and the Hashed al-Shaabi, a mostly Shia network including factions backed by Iran.

Tehran's pointman on Iraq, Major General Qasem Soleimani, has been in Baghdad for talks on a new prime minister after Adel Abdel Mahdi's recent resignation.

The US on Friday slammed Soleimani's presence as "a huge violation of Iraqi sovereignty."

It also slapped sanctions on three Iraqi Hashed leaders it accused of involvement in the deadly crackdown.