BAGHDAD - Iraq's powerful Shi'ite Muslim cleric Moqtada al-Sadr said on Monday he was quitting politics and closing his institutions in response to an intractable political deadlock, sparking protests by his followers and raising fears of more instability.

Sadr's supporters, who have been staging a weeks-long sit-in in Baghdad's fortified Green Zone, a sprawling area of ministries and foreign missions, stormed the main cabinet headquarters and demonstrated inside after his announcement.

Iraq's army declared a curfew from 3:30 p.m. (1230 GMT) and urged the protesters to leave the Green Zone to avoid clashes.

During the stalemate over forming a new government, Sadr has galvanised his legions of backers, throwing into disarray Iraq's effort to recover from decades of conflict and sanctions and its bid to tackle sectarian strife and rampant corruption.

Sadr was the biggest winner from an October election but withdrew all his lawmakers from parliament in June after he failed to form a government that excluded his rivals, mostly Iran-backed Shi'ite parties.

Sadr has insisted on early elections and the dissolution of parliament. He says no politician who has been in power since the U.S. invasion in 2003 can hold office.

"I hereby announce my final withdrawal," Sadr said in a statement posted on Twitter, criticising fellow Shi'ite political leaders for failing to heed his calls for reform.

He did not elaborate on the closure of his offices, but said that cultural and religious institutions would remain open.

Sadr has withdrawn from politics or government in the past and has also disbanded militias loyal to him. But he retains widespread influence over state institutions and controls a paramilitary group with thousands of members.

He has often returned to political activity after similar announcements, although the current political deadlock in Iraq appears harder to resolve than previous periods of dysfunction.

The current impasse between Sadr and Shi'ite rivals has given Iraq its longest run without a government.

Supporters of the mercurial cleric then stormed Baghdad's central government zone. Since then, they have occupied parliament, halting the process to choose a new president and prime minister.

Sadr's ally Mustafa al-Kadhimi, who remains caretaker prime minister, said he had suspended cabinet meetings until further notice after Sadrist protesters stormed the government headquarters on Monday.

Iraq has struggled to recover since the defeat of Islamic State in 2017 because political parties have squabbled over power and the vast oil wealth possessed by Iraq, OPEC's second-largest producer.

(Reporting John Davison in Baghdad, Amina Ismail in Erbil, Iraq; Additional reporting by Alaa Swilam; Writing by Lina Najem; Editing by John Stonestreet and Edmund Blair)