Supporters of Iraqi cleric Moqtada Al Sadr stormed the government palace in Baghdad's Green Zone on Monday after the Shiite leader said he was abandoning politics.
Twenty-three protesters were reported to have been killed. Unconfirmed reports suggested that Mr Al Sadr had gone on hunger strike to press for an end to the violence.
At least seven shells fell in the high-security Green Zone, which houses government buildings and diplomatic missions, a security source told AFP on Monday.
It was not immediately clear who was responsible for the shelling, which was followed by the sound of automatic weapons from the zone.
The security source said Mr Al Sadr's supporters opened fire at the Green Zone from the outside, adding that security forces inside “were not responding”.
Tensions have soared amid an escalating political crisis that has left Iraq without a new government, prime minister or president for months.
About 350 protesters were hurt, some with bullet wounds and others suffering the effects of teargas, medics told AFP.
On Monday, witnesses said that Al Sadr loyalists and supporters of a rival Shiite bloc, the pro-Iran Co-ordination Framework, had exchanged fire.
The Framework condemned an “attack on state institutions”, urging the Sadrists to engage in “dialogue”.
Iraq's Civil Aviation Authority announced late on Monday that flights at Baghdad International Airport were still coming and going.
The army has been caught in the middle of the rivalry between Mr Al Sadr and the Co-ordination Framework — a political coalition linked to US-designated terrorist groups, including Kataib Hezbollah, which has been accused of killing coalition soldiers and Iraqi protesters.
The army announced a nationwide curfew from 7pm, as security forces patrolled the capital.
Prime Minister Mustafa Al Kadhimi called on Mr Al Sadr's supporters to withdraw from the Green Zone, where they have been camped for weeks to prevent the cleric's rivals from trying to form a government.
“The dangerous developments that took place in our dear Iraq today points to the serious consequences of the political differences,” Mr Al Kadhimi said in a statement issued by his office.
Dr Anwar Gargash, diplomatic adviser to the President, called on Tuesday for calm and restraint among Iraqis and urged for all parties to proceed with dialogue following Monday’s violence.
“The stability of brotherly Iraq is an urgent Arab and regional demand, and there is no alternative to calm, restraint and constructive dialogue between Iraqis at this sensitive stage to get Iraq out of its crisis. Confrontation and violence are not in the interest of the Iraqis and the region,” Dr Gargash said in a tweet.
Mr Al Kadhimi called for restraint and said the country's political differences would damage state institutions.
He also ordered an investigation into the casualties, adding that “security or military forces, or armed men” were prohibited from opening fire on protesters.
Late on Monday evening, the prime minister took to Twitter.
“I value the call of His Eminence Sayyid Moqtada Al Sadr to stop the violence, as well as the call of Hajj Hadi Al Amiri, and all those who contribute to calm and preventing further violence. I call on all to assume the national responsibility for preserving Iraqi blood,” he said.
Mr Kadhimi later announced that he was chairing an “emergency meeting of security leaders to discuss recent events and the entry of demonstrators to government institutions”.
Iraq's official news agency confirmed late on Monday that Mr Kadhimi declared official working hours were cancelled on Tuesday because of the curfew, according to the General Secretariat of the Cabinet statement
The US urged calm amid the “disturbing” reports of unrest in Baghdad and denied rumours that it had evacuated its embassy, also in the area.
“The reports are false,” a State Department spokesman told The National. “As a matter of policy, we do not comment on matters involving internal security.”
Sadrists also stormed government buildings in the cities of Nasiriyah and Hillah south of Baghdad, an AFP correspondent and witnesses said.
Mr Al Sadr is said to have announced a hunger strike until the violence and use of weapons stops, Iraq's state news agency INA and state TV said on Monday.
Hassan Al Ethari, the head of the Sadrist parliamentary bloc, confirmed on Facebook that Mr Al Sadr had started a hunger strike.
“Removing the corrupt does not give anyone, no matter what, a justification for the use of violence from all sides,” Mr Al Ethari wrote.
There was no immediate confirmation from Mr Al Sadr's office.