BAGHDAD — As an awkward young cleric with a family name weightier than his own achievements, Moqtada al-Sadr began his quest for prominence after the toppling of Saddam Hussein. It rested on a sense of homegrown nationalism, a steely opposition to foreign domination and a willingness to fight.

He criticized political figures who were backed by Iran or promoted by Americans as unworthy of leadership.

“The people who deserve to rule are the ones who stayed here,” he said, sending his loyalists to battle American troops repeatedly in the early years of the U.S. occupation.

The labels he earned from U.S. officials reflected his growing notoriety: Over time, he went from “rabble-rouser” to “outlaw,” wanted by the U.S. government. 

Now, Sadr is poised to assume a new sobriquet: kingmaker, after leading a political coalition to what appeared to be an early lead in national elections in Iraq. Sadr did not run in the election but may be able to choose Iraq’s next leader.  

If the election results hold, it would cap a stunning evolution for Sadr, marking his transformation from the feared head of a Shiite militia to a populist political leader who has disavowed Iraq’s entrenched sectarianism. The coalition he gathered for the elections, which includes communist and secular figures, could upend Iraq’s political order and dilute the influence of the United States as well as Iran. 

What brought Sadr out of the fringes of Shiite-centric politics was neither military nor religious, but rather his embrace of a wave of popular demonstrations over quality of life and Iraq’s stagnant politics.

Ahmed al-Mayali, a political scientist at the University of Baghdad, said Sadr’s image had evolved from sectarian ­militant to populist in the aftermath of the Islamic State’s onslaught in 2014, which left the radical Islamist group in charge of a large slice of northern and western Iraq.

Sadr used his considerable power to mobilize hundreds of thousands of people to an ongoing popular protest movement calling for political overhauls.

“He began demanding what the street was demanding,” Mayali said. “He protested with them and addressed all Iraqis in a simple language everyone could understand. The language of ‘I'm one of you, not an elite.’ ”

“This gave him more supporters than he had before,” Mayali added.

In the immediate aftermath of the U.S. invasion of Iraq in 2003, Sadr’s support derived mainly from his famous name. His father, Grand Aya­tollah Mo­hammed Sadiq Sadr, was a revered cleric who was ass­assinated, along with two of his sons, by Hussein’s security forces in 1999.  

In the post-invasion chaos, the younger Sadr deployed his father’s network to provide for the residents of Baghdad’s impoverished quarters. 

“Faithful to his father’s populist vision, his organization had become a kind of street movement, from the Iraqi equivalent of the barrio, imbued with a profound antagonism to traditional Shiite authority and to the power those families represented,” the writer and Washington Post correspondent Anthony Shadid wrote in “Night Draws Near,” his chronicle of the U.S.-led invasion of Iraq and its aftermath.  

Sadr was distinct from the returning Iraqi exiles who were seeking power in Baghdad because he had stayed in Iraq during the worst of Hussein’s repression, Shadid wrote.  

“Like the poor Shiites, Sadr had suffered loss: his father, his brothers, and many of his other relatives were martyrs of the community. He spoke like the dispossessed; he even looked like them.”

His rhetoric — of rebellion and resistance to foreign influence — transformed into violent confrontation as Sadr’s Mahdi Army led uprisings against the U.S.-led coalition in several Iraqi cities and became one of the most feared militias during the years of Iraq’s sectarian civil war.  

After years of self-imposed retirement from politics, Sadr staged a dramatic return to the limelight several years ago, latching onto a movement demonstrating against corruption by Iraq’s political elite and calling for a new government.

By February 2016, Sadr had assumed a dominating role in the demonstrations, showing his talent for brinksmanship, self-promotion and his ability to command the streets. His supporters staged mass protests before storming the walls of Baghdad’s fortified Green Zone, as his militiamen, renamed as the Peace Brigades, secured the perimeter.  

When Sadr himself entered the Green Zone, it was a moment rich with symbolism: the maverick cleric, dismissed as a pretender by the establishment and derided as a firebrand by westerners, strolling into the redoubt of Iraq’s political elites. Soldiers who were there to guard the place embraced him, and a general kissed his hand.

In the protest tents, Sadr pulled off another unlikely trick: earning the trust of secular and reformist movements to form an unusual alliance that defied Iraq’s rigid, dysfunctional political order and underpinned his diverse ticket in Saturday’s election.

And he gained allies for his own growing political base of supporters — a movement characterized by the kind of devotion Sadr’s father had enjoyed a generation ago and that had allowed the young cleric to step out of his family’s shadow.  

“They follow him because they are convinced of him,” Mayali said.

Fahim reported from Istanbul.