In the years following the U.S.-led invasion of Iraq in 2003, the young cleric Muqtada al-Sadr burst onto the scene as a renegade champion of poorer Shiites, leading militant fighters who carried out deadly attacks on American forces and were notorious for sectarian killings against Sunni Muslims.
Now al-Sadr appears set to secure the most significant victory of his political career after a strong showing in parliament elections held over the weekend.
It is the latest stage in al-Sadr's political evolution. In recent years, he has gained popularity as a nationalist voice, opposing Iranian influence and waging a public campaign against corruption. For this election, he ran a non-sectarian campaign focused on issues of social justice, allying with secularists and Iraq's communist party, and broadening support beyond his traditional base.
"We are moving to a free and independent Iraq," al-Sadr said just before Saturday's voting in a televised address from his office in the Shiite city of Najaf. "We are going to move to an Iraq safe from corruption, terrorism and militias."
He warned that if there were manipulation and fraud in the election, "we will make the earthquake beneath the feet of the cheaters and corrupt."
Partial election returns announced Sunday showed al-Sadr's political alliance as the current front-runner, leading in four provinces, including Baghdad. An alliance of candidates linked to Iraq's powerful paramilitary groups appears set to come in second with Iraqi Prime Minister Haider al-Abadi trailing in third.
Al-Sadr himself did not run for parliament and so cannot be a candidate for the prime minister's post. But a significant number of seats for his movement would give him a strong voice in building the next government.
Muqtada al-Sadr has dipped in and out of Iraqi politics for over a decade, repeatedly reinventing himself. But he has consistently leveraged a deep popular appeal, closely tied to his lineage as well as his personal achievements and demands of his base.
Born to a prominent family of Shiite clerics, al-Sadr's relative Grand Ayatollah Mohammed Baqir al-Sadr was executed by Saddam Hussein in 1980. In 1999, al-Sadr's father Mohammed Sadiq al-Sadr was shot dead along with two of his sons in Najaf.
After the 2003 invasion, Muqtada al-Sadr led an uprising against the presence of U.S. forces in the country. His core support in Baghdad lives in Sadr City, a sprawling, poor, Shiite dominated neighborhood on the capital's edge renamed after the cleric's family following the overthrow of Saddam Hussein.
His militia, known as the Mahdi Army, battled repeatedly over the years with U.S. and Iraqi government forces in Baghdad and around Shiite holy sites in the south. It also participated in some of Iraq's most violent sectarian blood-letting; its fighters were accused kidnapping, torture and killings of Sunnis.
Throughout that time, his movement participated in elections, sometimes holding places in successive governments. Al-Sadr always showed his ability to mobilize millions, whether for political rallies or for elections.
Following the fall of Mosul to the Islamic State group in 2014, he resurrected his militia under a new name — the Peace Brigades — to fight the militants.
His forces were largely sidelined in the battle, even as other militia commanders were propelled to new heights of power. Militias with closer ties to Iran such as the Badr Brigades, Asaib Ahl Haq and Kataib Hezbollah were flooded with munitions, supplies and dispatched to high profile battles from Iraq's far west to the country's north.
Al-Sadr's forces maintained their own chain of command and were as a result delegated to largely operate in the city of Samarra, north of Baghdad, with the duty of protecting one of Shiite Islam's holiest shrines.
In 2016 al-Sadr remerged as a central figure in Iraq's political scene by taking a lead role in the anti-government protest movement that bubbled up amid a deepening economic crisis as the war against IS dragged on. Al-Abadi's efforts to address demands for better government services and greater employment prospects have been stymied by political gridlock in Baghdad.
In April of that year, al-Sadr rallied thousands of supporters who stormed Baghdad's highly fortified Green Zone to demand political reforms. The protests rocked Baghdad and forced al-Abadi to pull troops from the frontline against IS back to the capital to secure the city's streets.
While many observers expected al-Abadi to win votes by campaigning on his role overseeing the military defeat of IS in Iraq, al-Sadr tapped into long-simmering frustration with Baghdad's inability to improve the lives Iraqis far from the frontline fight.
"After security improved, (Iraqis in Baghdad) began to notice how shabby the city is and the lack of utilities and the general failure of government to reconstruct anything since 2003," said Patrick Cockburn, a journalist for The Independent who wrote a 2008 book on al-Sadr and interviewed him a number of times.
The physical evidence of those government failures is readily visible in Sadr City. Tangles of electrical wires hang from the crumbling facades of dusty store-fronts and narrow, overcrowded homes. Bright blue banners for al-Sadr's election alliance jostle for space along streets lined with martyr posters and images of al-Sadr and his father.
"From the beginning Sadr was always underestimated by both Iraqis and foreigners," Cockburn explained. "But in previous elections the organization of the Sadrists has always been pretty impressive, they've always been good at elections."
Associated Press reporters Philip Issa and Qassim Abdul-Zahra contributed to this report.