Iraq's divisive premier Nuri al-Maliki dropped his bid to stay in power Thursday, bowing to huge domestic and international pressure as a jihadist-led offensive threatens to tear the country apart.
The two-term premier threw in the towel after an acrimonious political battle and backed his designated successor Haidar al-Abadi, a fellow member of the Shiite party Dawa.
"I announce before you today... the withdrawal of my candidacy in favour of the brother Doctor Haidar al-Abadi," he said in a televised address, with Abadi standing next to him.
His decision was swiftly welcomed by the US and the UN.
"Today, Iraqis took another major step forward in uniting their country," US National Security Advisor Susan Rice said in a statement.
UN Secretary-General Ban Ki-moon said Maliki's withdrawal "will allow the crucial process to form a new government to proceed swiftly and within the time frame provided for in the constitution."
He urged the formation of "an inclusive, broad-based government ready to immediately tackle these pressing issues."
Maliki, 64, turned the page on eight years that saw him rise from the relative anonymity of a former exile who returned in the wake of the 2003 US-led invasion to become a feared and powerful ruler.
Quelling fears a desperate bid to cling to power could worsen what is already Iraq's worst crisis in years, Maliki said he was stepping aside to "facilitate the progress of the political process and the formation of the new government."
He defended his record at the helm but critics say his sectarian policies have alienated and radicalised the Sunni minority, most of whose heartland was overrun by extremist Islamic State fighters facing little or no popular resistance two months ago.
The jihadist group has since declared a "caliphate" straddling Syria and Iraq, hunted down religious minorities, destroyed holy sites, seized the country's largest dam and several oil fields.
The devastating militant advance has also displaced hundreds of thousands of people and posed an immediate existential threat to the world's seventh oil producer by de facto redrawing its borders along ethnic and sectarian lines.
Iraqi forces completely folded when IS forces moved in and while the Kurdish peshmerga initially fared better, the US arms that retreating federal troops left behind made the jihadists a formidable foe.
President Barack Obama said a week of US air strikes had broken the siege on a northern mountain where civilians had been hiding from jihadists for more than 10 days.
The ordeal of tens of thousands of people, mostly from the Yazidi minority, was one of the dramatic chapters of the devastating two-month conflict and one of the reasons Obama sent warplanes back over Iraq, three years after pulling his troops out.
"We helped save many innocent lives. Because of these efforts, we do not expect there to be an additional operation to evacuate people off the mountain and it's unlikely we're going to need to continue humanitarian air drops on the mountain," Obama said.
He had warned that a massacre on Mount Sinjar could lead to a genocide against the vulnerable Yazidi minority, whose members are now largely massing into camps in autonomous Kurdistan.
The Pentagon said 4,000 to 5,000 Yazidis remained on the mountain, which they hold to be the final resting place of Noah's Ark, but explained 2,000 "reside there and may not want to leave".
Obama added that the air strikes, first launched on August 8, would go on.
EU ministers were set to convene in Brussels on Friday to seek unanimous approval for the shipment of arms to Iraqi Kurds fighting the Islamic State jihadists.
The unscheduled gathering comes after days of forceful demands by France, whose Foreign Minister Laurent Fabius criticised EU colleagues for remaining on holiday while besieged civilians were being killed in Iraq.
Britain would "favourably consider" arming Kurdish forces in their battle against Islamic State (IS) militants in Iraq, a spokesman for the British prime minister's office said on Thursday.
Thousands of people have poured across a border bridge into camps in Iraq's Kurdish region after trekking through neighbouring Syria to find refuge, most with nothing but the clothes on their backs.
Some women carried exhausted children, weeping as they reached the relative safety of the camps.
The hundreds of thousands of Yazidis, Christians, Turkmen, Shabak and other people who have been displaced in recent weeks have little prospect of returning home any time soon.
Washington has ruled out boots on the ground and the fight-back is being led Kurdish forces who, despite Western arms deliveries, have so far contained IS fighters rather than reclaimed large tracts of territory.
The international community had for weeks stressed that no effective counter-offensive could take place without a cohesive government steering the country.
Obama, the United Nations, Iraq's most revered Shiite cleric and even much of his own parliamentary bloc had made it clear that government could not be headed by Maliki.
Observers had said Maliki had reasons to fear for his life or at least his freedom after relinquishing the premiership and could seek to stay in a position of power as a protection.