Shelling targeted Baghdad's high-security Green Zone on Monday, a security source said, after Shiite cleric Moqtada Sadr said he was quitting politics, sparking chaos in which 15 of his supporters were killed.
Tensions have soared in Iraq amid a political crisis that has left the country without a new government, prime minister or president for months, and escalated sharply after Sadr's supporters stormed the government palace following their leader's announcement.
At least seven shells fell in the high-security Green Zone, which houses government buildings and diplomatic missions, the security source said late Monday on condition of anonymity.
It was not immediately clear who was behind the shelling, which was followed by the sound of automatic weapons in the Green Zone.
The security source said Sadr's supporters opened fire at the Green Zone from the outside, adding that security forces inside "were not responding".
Shots were fired earlier in the fortified area, an AFP correspondent said, and medics said 15 Sadr supporters had been shot dead and 350 other protesters injured -- some with bullet wounds and others suffering tear gas inhalation.
Witnesses said earlier that Sadr loyalists and supporters of a rival Shiite bloc, the pro-Iran Coordination Framework, had exchanged fire.
The Framework condemned an "attack on state institutions", urging the Sadrists to engage in "dialogue".
The army had announced a nationwide curfew from 7:00 pm (1600 GMT).
Caretaker Prime Minister Mustafa al-Kadhemi said "security or military forces, or armed men" were prohibited from opening fire on protesters.
Calling the earlier developments "an extremely dangerous escalation", the United Nations Assistance Mission in Iraq (UNAMI) urged "all" sides to "refrain from acts that could lead to an unstoppable chain of events".
"The very survival of the state is at stake," it warned.
The United States also urged calm amid the "disturbing" reports of unrest in Baghdad while France called on "the parties to exercise the utmost restraint" and "immediately cease the deadly clashes".
Protests spread to other parts of the country, with Sadr followers storming government buildings in the cities of Nasiriyah and Hillah south of Baghdad, an AFP correspondent and witnesses said.
Shortly after he made his surprise declaration, Sadr's followers burst into the Republican Palace in Baghdad, where cabinet meetings are usually held.
Inside the opulent palace, protesters lounged in armchairs in a meeting room, some waved Iraqi flags and took photographs of themselves, and others cooled off in a swimming pool in the garden.
Sadr -- a grey-bearded preacher with millions of devoted followers, who once led a militia against American and Iraqi government forces -- announced earlier on Twitter he was stepping back from politics.
"I've decided not to meddle in political affairs. I therefore announce now my definitive retirement," said Sadr, a longtime player in the war-torn country's political scene, though he himself has never directly been in government.
He added that "all the institutions" linked to his Sadrist movement will be closed, except the mausoleum of his father, assassinated in 1999, and other heritage facilities.
His latest statement came two days after he said that "all parties" including his own should give up government positions in order to help resolve the political crisis.
His bloc emerged from last year's election as the biggest in the legislature, with 73 seats, but short of a majority.
In June, his lawmakers quit in a bid to break the logjam, which led to the Coordination Framework becoming the largest bloc.
Hamzeh Hadad, from the European Council on Foreign Relations (ECFR), said it was "not clear" what Sadr's strategy was.
"Whatever it does mean, in typical Sadrist fashion, there is always backtracking expected," Hadad said.
"The second, and more terrifying thought on this is that he is giving his followers the green light to do whatever they like."
Millions of followers
Iraq has been mired in political deadlock since legislative elections in October last year due to disagreement between Shiite factions over forming a coalition.
Sadr's supporters have been calling for parliament to be dissolved and for new elections.
But on Saturday, the cleric said it was "more important" that "all parties and figures who have been part of the political process" since the 2003 US-led invasion "no longer participate".
"That includes the Sadrist movement," he said.
Sadr's supporters have for weeks been staging a sit-in outside Iraq's parliament, after storming the legislature's interior on July 30 to press their demands.
The Coordination Framework wants a new head of government to be appointed before any new polls are held.
Kadhemi had earlier this month convened crisis talks with party leaders, but the Sadrists boycotted.