Iraq is gearing up for key parliamentary elections on Saturday, some five months after declaring victory over ISIS, with the dominant Shiites split, the Kurds in disarray and Sunnis sidelined.
A lull in violence ahead of the fourth such nationwide vote since Saddam Hussein was toppled in 2003 has spurred some hope for Iraqis, but surging tensions between key players Iran and the US could rattle the country.
Prime Minister Haider Al Abadi — who has balanced off Washington and Tehran — is angling for a new term as he takes credit for the brutal fightback against the extremists and seeing off a Kurdish push for independence.
Iraqi elections highlights Basra corruption
ISIS claims assassination of Iraq election candidate
But stiff competition from within his Shiite community, the majority group that dominates Iraqi politics, should fragment the vote and spell lengthy horse-trading to form any government.
Whoever emerges as premier will face the mammoth task of rebuilding a country left shattered by the battle against ISIS.
Despite a rare period of calm, more than two and a half million people remain internally displaced and the extremists still pose a major security threat.
Over 15 blood-sodden years since the US-led invasion upended Iraqi politics there is also widespread disillusionment with the same old faces from an elite seen as mired in corruption and sectarianism.
Mr Abadi — who took over as ISIS rampaged across the country in 2014 — is facing two leading Shiite challengers to his Victory Alliance, which has pitched itself as an attempt to bridge Iraq's Shiite-Sunni divide.
Former Prime Minister Nuri Al Maliki — a bitter foe despite coming from the same Dawa party — is widely reviled for stirring sectarianism and losing territory to ISIS, but draws support from a hardline base.
Former Transport Minister Hadi Al Ameri — who has close ties to Iran's Revolutionary Guards — is hailed by many as a war hero after leading paramilitary units that fought ISIS alongside Baghdad's troops.
He wants US forces that helped battle the extremists to leave Iraq for good, challenging Mr Abadi's cautious foreign policy that has seen him build bridges with Iran's rival Saudi Arabia.
Overall just under 7,000 candidates are standing and Iraq's complex system means no single bloc looks set to get anything near a majority in the 329-seat parliament.
"There is certainly a contest between the three main lists for the post of prime minister, but that will not impact the system that sees the Shiites control and run Iraq," said Jordan-based analyst Adel Mahmud.
Among the other groups jostling for position in the negotiations to come is an unlikely alliance between Shiite cleric Moqtada Sadr and secular communists that is looking to ride a wave of protests against corruption.
Votes in the Sunni heartlands once dominated by ISIS — including Iraq's devastated second city Mosul — are up in the air as traditional alliances have been shredded by the fallout of extremist rule.
Mr Abadi is aiming to be the first Shiite leader to make inroads there but apathy is high as people struggle to rebuild their lives and few efforts have been made to reach out to the hundreds of thousands still displaced in camps.
Iraqi Shiite cleric rejects Maliki's call for an alliance
Political forces in the Kurdish community — often seen as potential kingmakers — are also in disarray after a controversial vote for independence in September backfired spectacularly.
Baghdad unleashed a battery of sanctions and seized back disputed oil-rich regions in the wake of the ballot and the Kurds now look set to lose some of their clout on the national stage.
In a sign of the disenchantment with Iraq's squabbling elite, the country's top Shiite cleric Ayatollah Ali Sistani has broken with previous habits and not urged people to cast ballots.
Instead he demanded that Iraq's nearly 24.5 million registered voters refuse to re-elect legislators who have already held government jobs and proved to be "corrupt and failing".
The swirling uncertainty around the elections has sparked concern that ISIS — which has threatened to attack the vote — could profit from any power vacuum.
There are also fears that a spike in tensions between the US and Iran after President Donald Trump withdrew from the nuclear deal could spill over into Iraq, where both play major roles.
But while the situation remains combustible, analysts say that for now no side appears keen on destabilising Iraq as it emerges from the turmoil of the war against the extremists.
The US withdrawal from the Iran nuclear agreement "will of course have a direct influence on the political situation in Iraq", said Iraqi political expert Essam Al Fili.
"But the situation is sensitive and parties loyal to Iran will surely want to join forces with a moderate Shiite figure who can get American approval."