Abdul Aziz al-Hakim, who has died aged 59, was one of the architects of post-Saddam Iraq, scion of a Shia clerical dynasty and a political kingmaker. But two years before Iraq's 2005 elections, few could have predicted that the coalition led by the usually taciturn cleric would sweep to victory.

Until late 2003, Hakim had been deputy chairman of the Supreme Council for Islamic Revolution in Iraq (Sciri), mortal enemies of Saddam Hussein's regime. He directed the party's 10-15,000-strong paramilitary unit, the Badr Brigades, and represented Sciri on Iraq's governing council after America ousted Saddam.

At first, he lived in the shadow of his charismatic elder brother, Ayatollah Mohammed Baqir al-Hakim, the Sciri supreme leader. Then, on 29 August 2003, a bomb outside the Mosque of Ali in Najaf killed Baqir and 80 others. Many believed Sciri had been decapitated, and when 180 Shia worshippers were massacred in March 2004, Sunni versus Shia civil war seemed almost inevitable.

That such predictions proved false owed much to Hakim. He succeeded Baqir as Sciri chief, reinvigorated the party, navigated between the contending demands of the US and his erstwhile patron, Iran, and defied bloodcurdling threats from former Ba'athists and al-Qaida proxies.

In mid-2004 Hakim rebuffed another challenge, from Sheikh Muqtada al-Sadr and his Baghdad-based Shia renegades, who scorned the perceived passivity of elder clerics. "Sadrists" detested American occupation and took control of sacred Shia sites. But Hakim neutralised the young pretender and, with coalition assistance, reimposed Sciri rule over Najaf, Karbala, Kufa and Basra.

By December 2004, he had choreographed 22 rival factions into a United Iraqi Alliance. The list of 228 candidates included Sciri, al-Da'wa, the Iraqi National Congress and Sadrists, and soon won the endorsement of the Shia Grand Ayatollah, Ali al-Sistani.

Shias, nearly two-thirds of the population, had been largely excluded from power since the birth of modern Iraq in 1921. Now, with democracy, whoever could galvanise a critical mass of Shias was assured of national leadership. Even worldly urbanites respected Hakim as the last surviving son of Grand Ayatollah Muhsin al-Hakim, the marja taqlid, or "source of emulation" for Shias globally during 1955-70.

A good listener and proven negotiator during Sciri's years of exile, Hakim downplayed Sciri's adherence to Iranian-style wilayet al-faqih (rule by religious jurisprudence). He also vowed to safeguard the heterogeneous identity of his multiethnic, multi-confessional nation. And in May 2007 he renamed Sciri the Supreme Islamic Iraqi Council (SIIC), dropping the phrase "revolution", as they had now toppled the Ba'athists.

Hakim was born in Najaf, central Iraq. Steeped in theology, a highly trained Shia jurist and ever suspicious of Baghdad, in 1977 he helped lead the abortive Safar rebellion. Saddam stifled Shia religious and communal expression. His regime repeatedly imprisoned Hakim and executed or otherwise murdered 36 members of his family, including eight of his 10 brothers, during the 1980s and 1990s.

Both surviving Hakim brothers fled to Iran when the 1980-88 Iran-Iraq war began. In November 1982, they formed Sciri and in 1983 they set up the Badr Brigades. Armed and trained by Iranian Revolutionary Guards, they absorbed Shia Iraqi army deserters. Abdul Aziz also established a human rights documentation centre and provided aid to Iraqi refugees encamped in Iran.

In March 1991, the Hakims fomented a revolt in southern Iraq after US forces ejected Saddam from Kuwait. America failed to support them, though, and Iraqi forces crushed the uprising, killing 30,000 fighters and civilians.

In 1999, Sciri refused American congressional funding and in mid-2002, it opposed US plans for invasion. However, at the London conference of December 2002, Hakim re-established Sciri as Iraq's predominant opposition.

After 23 years he returned to rapturous crowds in Kut in April 2003, blazing a trail for his elder brother, who arrived a month later. Initially Sciri boycotted the US-led Coalition Provisional Authority and the US defence secretary, Donald Rumsfeld, deemed their militia to be enemy combatants. After July 2003, though, Sciri joined the interim council. Hakim briefly served as its head, ensconced in the capacious Baghdad home of Saddam's ousted acolyte, Tariq Aziz. As Sciri's new leader after August, he drew closer to the hawza, the supreme Shia collegiate leadership.

While publicly opposing the Americans, Hakim privately co-ordinated security with them. He accepted a US amnesty, surrendered the Badr Brigades' heavy weapons, and began turning it into a police force cum reconstruction division.

He denied rivals' assertions that he marched to Tehran's drum. "Iraq [must] go to the people and not permit any group to seize power," he said. On 30 January 2005, the people spoke clearly. Notwithstanding Sunni boycotts, and despite competing against another 110 party lists, Hakim's UIA gained 41% of the vote and 128 out of 275 seats.

UIA unity suffered as Hakim, a heavy smoker, was absent during treatment for lung cancer after 2007. Moreover, his militias clashed with Sadr's Mahdi army during 2006-07, and fought Iraqi troops in 2008 around Basra. In the January 2009 local elections SIIC lost control over eight provinces. Nonetheless, just two days before Hakim died, his SIIC joined forces with Sadr's faction to form a new National Alliance. By excluding Maliki's Dawa party, the alliance brings intra-Shia schisms into the open before Iraq's crucial January 2010 national elections. Much credit for forming this ticket must go to Hakim's younger son and intellectually talented putative successor, Ammar.