For years during the long U.S. occupation of Iraq, Muqtada Sadr was an intractable foe, blamed by the Pentagon for hundreds of deaths of American service members, as well as atrocities against Iraqi civilians.
But his surprise lead in Iraq's parliamentary election may force American officials into a new, unfamiliar relationship with a onetime foe, who rode to victory on a platform that called for attacking Iraq's endemic corruption and ousting Iran, in addition to the U.S. military, from Iraq.
By any account, Sadr's possible role as kingmaker after the weekend election will complicate the U.S. military mission, which now consists largely of training and mine-clearing in parts of the country that have been wrested back from the Islamic State militants.
Asked Tuesday whether he was upset by Sadr's victory, Defense Secretary James N. Mattis ignored the question.
"The Iraqi people had an election. It's a democratic process at a time when people, many people, doubted that Iraq could take charge of themselves. So we will wait and see the results — the final results of the election," said Mattis, who commanded Marines as a general in Iraq's Anbar province during some of the most violent years of the Iraq war.
"And we stand with the Iraqi people's decisions."
His comments echoed similar noncommittal statements across the administration, including the State Department and National Security Council.
"We are very well aware of Muqtada al-Sadr and his background and his positions now," State Department spokeswoman Heather Nauert said when asked about concerns over Sadr's victory.
Some U.S. officials believe that Sadr, a 44-year-old Shiite cleric, is now less virulently anti-American than he was in 2003, when his militia, the Mahdi Army, battled forces of the U.S.-led coalition, set off bombs and attacked Sunni communities.
In one significant departure from his past, Sadr has been openly critical of Iran, and even made a recent trip to Saudi Arabia, archrival of Tehran.
That could mean that an Iraqi government with Sadr in it will not necessarily disrupt Iraqi cooperation with the Pentagon against Islamic State.
Any unease on the U.S. side, several analysts said, is likely to be counterbalanced by Sadr's call for shrinking Iran's influence in Baghdad's Shiite-dominated government — another longtime U.S. goal. Sadr has called for both the U.S. and Iran, which also sent advisors and assistance in the fight against the Islamic State, to leave Iraq.
"Will there be less willingness to cooperate with the U.S.? Maybe," Douglas Ollivant, a former National Security Council official in the George W. Bush and Obama administrations, said.
"But that will be more than offset by the pushback against the Iranians," added Ollivant, who served in Baghdad as an Army officer during the surge of U.S. troops in 2007.
What Sadr's role will be in any new government remains to be seen. In Iraq's convoluted parliamentary system, his Sairoon coalition led the vote but did not win a majority that would have allowed it to rule alone. A minimum of two weeks of negotiation and horse-trading among the factions now begin. In the end, Sadr might even find himself on the outs.
Failure to form a functional government after the vote, analysts warned, could lead to political paralysis that would impede any efforts at reform, long a U.S.-backed project, and could leave a vacuum where more pro-Iranian politicians would step in to take charge.
In the meantime, U.S. officials are reacting cautiously as they await final official results of the vote, in which nearly 7,000 candidates vied for 329 parliamentary seats.
Iraq's Prime Minister Haider Abadi, who was the preferred U.S. candidate in the election, had been widely regarded as the favorite. His campaign capitalized on the military victories against Islamic State, but his party is holding at third place.
Abadi's party could be a likely coalition partner for Sadr. If the Kurdish faction is added to that, American officials believe, the result could be favorable to U.S. interests.
Joining Abadi in a poor showing was Nouri Maliki, the former prime minister whose pro-Iranian stance has long frustrated U.S. military advisors in Iraq. U.S. officials say Maliki's closeness to Iran contributed to the rise of Islamic State, a largely Sunni movement that gained strength from Sunni grievances about their treatment under his government.
During the height of the U.S. military presence in Iraq more than decade ago, Sadr was a formidable and often underestimated American foe whose call for ending the U.S. occupation proved a powerful rallying cry for Iraq's Shiite poor.
Militias loyal to the Iraqi cleric fought bloody battles against U.S. troops in Sadr City, a Baghdad slum controlled by his supporters.
But following the end of the large-scale U.S. presence in Iraq in 2011, Sadr's public criticism of the U.S. eased. He remained restrained even after the U.S. sent troops back in 2014.
"Once the U.S. was no longer an occupying power, he no longer had that much of a problem with the U.S.," said Ollivant, a fellow at the New America Foundation, a Washington think tank.
With the American presence reduced in numbers — the Pentagon is drawing down U.S. force levels, which reached 5,200 at the high point of the fight against Islamic State — Sadr turned to his first hatred, Iran, and cast himself as an ardent nationalist, shunning any occupiers.
Nonetheless, memories of often brutal battles against Sadr's supporters have not faded among U.S. soldiers, and Pentagon officials say privately that they still distrust him.
"He is a corrupt 'leader' of gangs," Mark Hertling, a retired U.S. Army lieutenant general, said in a tweet Tuesday.
Hertling recalled fighting Sadr in 2003-4 in Baghdad and in the southern cities of Kut and Najaf "as the Iraqi government debated arresting him for murder of his rivals" and then again "as he fomented anarchy in Baghdad in 2008."
Other military officials said they held out hope that Abadi, with his strong U.S. backing, will somehow be able to assemble a coalition that enables him to stay on as prime minister.
"It's not the best outcome, but we remain hopeful," said one official, who asked to remain anonymous to discuss internal assessment.
Iraqi Shiites historically have chafed at Iran's influence and refused to import the theocratic-style rule of their neighbor. Sadr's powerful father, the late Mohammed Sadeq Sadr, was a fiercely nationalistic cleric who promoted the Shiites' identity as Iraqis and Arabs.
In addition, if Sadr and his supporters hope to make any headway against endemic corruption, as he pledged to do during the campaign, they will need the backing of the U.S. to get help from the International Monetary Fund, the World Bank and other international institutions. Iraq has suffered chronic power shortages and insecurity for 15 years and needs an estimated $88 billion to rebuild areas destroyed in the four-year war against Islamic State.
Despite the complications and numerous moving parts, Iraq's change in government could provide U.S. policymakers with an opportunity to set right the chaos and suffering of the last years, some analysts said.
"The U.S. must do everything it can to convince as many of those who are elected that it will support a strong and independent Iraq — rather than try to create a client state," Anthony Cordesman, an expert at the Center for Strategic and International Studies, said in an analysis he wrote for the think tank, "and that it will help any elements of the new government that actively seek reform, recovery and development."
Nauert of the State Department said, "We have a good relationship ... with the government of Iraq and we believe that we will continue to do that."
For more on international affairs, follow @TracyKWilkinson on Twitter