By Ahmed Rasheed and Stephen Kalin
BAGHDAD (Reuters) - A power struggle within Iraq's Shi'ite Muslim majority has intensified as attempts to form a new government flounder, threatening to turn violent and ruin U.S.-led efforts to defeat Islamic State.
For the first time since the U.S. withdrawal at the end of 2011, Shi'ite factions came close to taking arms against each another last month, when followers of powerful cleric Moqtada al-Sadr stormed the parliament in Baghdad's Green Zone.
Rival Shi'ite militiamen took up positions nearby, raising the specter of intra-Shi'ite fighting similar to events in the southern city of Basra in 2008, in which hundreds of people were killed.
Trucks carrying those militiamen, armed with rocket-propelled grenades and machine guns, patrolled the capital in clear view of the security forces, video published on the website of Iranian-backed group Saraya al-Khorasani showed.
The crisis presents the biggest political challenge yet to Prime Minister Haider al-Abadi, a moderate Shi'ite Islamist who took office in 2014 promising to defeat Islamic State, mend rifts with the minority Sunnis and Kurds, and root out corruption eating away at state income which has already been eroded by a slump in oil prices.
Sadr, the heir of a revered clerical dynasty, says he backs Abadi's planned political reforms and has accused other Shi'ite leaders of seeking to preserve a system of political patronage that makes the public administration rife for corruption.
His followers stormed the heavily fortified Green Zone on April 30 after rival political groups blocked parliamentary approval of a new cabinet made up of independent technocrats proposed by Abadi to fight graft.
A commander in Saraya al-Khorasani, which deployed near the Green Zone in response, made it clear that they would fight rather than allow Sadr's followers to occupy the district which houses parliament, government offices and embassies.
"We are here to kill this sedition in its cradle," the commander, dressed in green camouflage and a black turban told his fighters, the online video shows.
The prospect of violence receded a few days later as the Sadrists left the Green Zone and the rival militiamen were replaced by army and police.
But the episode offered a glimpse into a struggle for dominance within the Shi'ite community which is supposed to be united in the push to defeat Islamic State, the ultra-hardline Sunni group that seized around a third of Iraq's territory in 2014.
"We were only inches away from a violent, bloody scenario," said a senior Shi'ite lawmaker, echoing comments from security and government officials who all declined to be named speaking about internal divisions.
At a meeting on May 1 by members of the National Alliance, a loose political umbrella group formed in 2010 by the main Shi'ite groups including Sadr's, the other Shi'ite leaders "were convinced he had crossed a line", the lawmaker said.
Sadr did not attend the meeting but those present "sent him a warning" that his supporters could be removed by force if necessary, said the lawmaker who took part in the meeting.
Two other politicians who attended confirmed the message was sent to Sadr, a 42-year-old whom critics often deride as an upstart, accusing him of trying to dictate terms to the rest of the National Alliance.
"Unfortunately there are politicians ready to burn Iraq for their own interests and ambitions under the pretext of reforms," said Ammar al-Hakim, a prominent Shi'ite cleric who has ties to Iran and heads the Islamic Supreme Council of Iraq, one of the main components of the National Alliance.
Sadr has mobilized tens of thousands of followers over the past few months to pressure Prime Minister Abadi to follow through on his reform pledges, which are also backed by Iraq's top Shi'ite cleric, Grand Ayatalloh Ali al-Sistani.
The last episode of Shi'ite infighting spilling over into deadly violence was in 2008 when Abadi's predecessor, Nuri al-Maliki, ordered the army to battle Sadr's followers in Basra to end their control over parts of the southern region where most of the OPEC nation's oil is produced.
Unlike the current situation, Sadr was confronted then by government troops, not a militia.
But it was still considered intra-Shi'ite because the army is mostly made up of Shi'ites and Maliki, a politician close to neighboring Iran, had a sectarian agenda that also alienated Sunnis and Kurds during his eight-year rule.
Maliki handed over power to Abadi in 2014 after the army failed to stop Islamic State's advance, and is now considered an adversary of the prime minister.
Iraq's most powerful militias receive funds, weapons and training from Iran, putting them at odds with Sadr who once benefited from Iranian support but has positioned himself as a more nationalist leader.
Saraya al-Khorasani and Badr Organisation, one of the top Iranian-backed groups, along with Sadr's Peace Brigades and dozens of smaller groups, fight alongside the U.S.-backed Iraqi army against Islamic State, under an umbrella group known locally as Hashid Shaabi, or Popular Mobilisation Forces.
Their unity of purpose, though, appears to have begun to fray and the Iranian-backed militias' show of force demonstrates the state's struggle to confront their growing power.
After a string of deadly bombings in Baghdad last week claimed by Islamic State, politicians from Badr and Sadr's bloc accused each other of complicity.
Sadr, meanwhile, appears intent on claiming the mantle of the country's leading reformer -- a move that may be aimed at least in part at positioning himself for nationwide elections over the next two years.
(Additional reporting by Saif Hameed; Writing by Maher Chmaytelli; Editing by Robin Pomeroy)