BAGHDAD (Reuters) -- Nationalist cleric Moqtada al-Sadr, a long-time adversary of the United States, led in Iraq's parliamentary election with more than half the votes counted on Monday, the electoral commission said, in a surprise turn of fortune for the Shi'ite leader.
In the first election since Islamic State was defeated in the country, Shi'ite militia chief Hadi al-Amiri's bloc, which is backed by Iran, was in second place, while Prime Minister Haider al-Abadi, once seen as the front-runner, trailed in third position.
The preliminary results were based on a count of more than 95 percent of the votes cast in 10 of Iraq's 18 provinces.
Unlike Abadi, a rare ally of both the United States and Iran, Sadr is an opponent of both of the countries which have wielded influence in Iraq since a U.S.-led invasion toppled Sunni dictator Saddam Hussein and ushered the Shi'ite majority to power.
Sadr has led two uprisings against U.S. forces in Iraq and is one of the few Shi'ite leaders to distance himself from Iran.
Potraying himself as an Iraqi nationalist, Sadr has a zealous following among the young, poor and dispossessed, but he had been sidelined by influential Iranian-backed figures.
He can not become prime minister as he did not run in the election, though his apparent victory puts him in a position to pick someone for the job.
But even then his bloc might not necessarily form the next government since whoever wins the most seats must negotiate a coalition government in order to have a majority in parliament. The government should be formed within 90 days of the official results.
The election held on Saturday is the first since the defeat of Islamic State, with the capture of its de facto capital Mosul, last year. The group overran a third of Iraq in 2014.
Turnout was 44.52 percent with 92 percent of votes counted, the Independent High Electoral Commission said - that was significantly lower than in previous elections. Full results are due to be officially announced later on Monday.
Sadr and Amiri both came in first in four of the 10 provinces where votes were counted, but the cleric's bloc won significantly more votes in the capital, Baghdad, which has the highest number of seats.
A document provided to Reuters by a candidate in Baghdad that was also circulating among journalists and analysts showed results from all 18 provinces.
Reuters could not independently verify the document's authenticity but the results in it showed Sadr had won the nationwide popular vote with more than 1.3 million votes and gained 54 of parliament's 329 seats.
He was followed by Amiri with more than 1.2 million votes, translating into 47 seats, and Abadi with more than 1 million votes and 42 seats, according to calculations made by Reuters based on the document. Ex-Prime Miniser Nuri al-Maliki, a close ally of Iran like Amiri, came in fourth with 25 seats.
Winning the largest number of seats does not automatically guarantee that Sadr will be able to hand-pick a prime minister. The other winning blocs would have to agree on the nomination.
In a 2010 election, Vice President Ayad Allawi's group won the largest number of seats, albeit with a narrow margin, but he was blocked from becoming prime minister for which he blamed Tehran.
And a similar fate could befall Sadr. Iran has publicly stated it would not allow his bloc to govern and may try to form a governing coalition between its allies, Amiri and Maliki.
"We will not allow liberals and communists to govern in Iraq," Ali Akbar Velayati, top adviser to the Islamic Republic's Supreme Leader Ayatollah Ali Khamenei, said in February.
His statement, which sparked criticism by Iraqi figures, was referring to the electoral alliance between Sadr, the Iraqi Communist Party and other secular groups who joined protests organized by Sadr in 2016 to press the government to see through a move to stem endemic corruption.
Iraqi Communist Party Secretary General Raed Fahmy told Reuters the vote in favor of the Sadrist list, backed by his group, "is is a clear message that we must have balanced relations with all (foreign countries) based non-interference in Iraq's internal affairs."
"Everybody is welcome to provide support to Iraq, but not at the expense of its sovereignty and independence," he added.
During the campaign, frustrated Iraqis of all shades complained about their political elite's systematic patronage, bad governance and corruption, saying they didn't receive any benefits of their country's oil wealth.
"The importance of this vote is that it is a clear message that the people wants to change the system of governance which has produced corruption and weakened state institutions," said Fahmy. "It is a message to provide services to the people, health and education, and to reduce social disparities."
Iraq has been ranked among the world's most corrupt countries, with high unemployment, rife poverty, weak public institutions and bad services despite high oil revenues for many years. Endemic corruption has eaten at the government's financial resources.
Sadr derives much of his authority from his family. Sadr's father, highly respected Grand Ayatollah Mohammed Sadeq al-Sadr, was murdered in 1999 for defying Saddam Hussein. His father's cousin, Mohammed Baqir, was killed by Saddam in 1980.
Celebrations erupted on the streets of Baghdad after the commission's announcement, with thousands of Sadr's supporters singing, chanting, dancing and setting off fireworks while carrying his picture and waving Iraqi flags.
Many of his supporters chanted "Iran out".
Whoever wins the election will have to contend with the fallout from U.S. President Donald Trump's decision to quit Iran's nuclear deal, a move Iraqis fear could turn their country into a theater of conflict between Washington and Tehran.
Abadi, a British-educated engineer who came to power four years ago after Islamic State seized a third of Iraq's territory, received U.S. military support for Iraq's army to defeat the Sunni Muslim militant group even as he gave free rein to Iran to back Shi'ite militias fighting on the same side.
Viewed as a frontrunner before the election, his rivals were seen as Maliki and Amiri, both closer than Abadi to Iran, which has wide sway in Iraq as the primary Shi'ite power in the region.
If parliament chooses to grant him a second term, Abadi will remain under pressure to maintain that balancing act amid tensions between Washington and Tehran over the nuclear accord.
Abadi was seen by some Iraqis as lacking charisma and as ineffective. He had no powerful political machine of his own when he took office.
But the defeat of Islamic State and Abadi's campaign to eradicate Iraq's rampant corruption improved his standing.
Amiri's Badr organization played a key role in the battle against Islamic State. But some Iraqis resent his close ties to Tehran. The dissident-turned-militia leader spent more than two decades fighting Saddam from exile in Iran.
Additional reporting by Huda Majeed, and Reuters Video News in Baghdad and Raya Jalabi in Erbil; Writing by Ahmed Aboulenein and Michael Georgy; Editing by Samia Nakhoul, William Maclean and Richard Balmforth.