Caving in to relentless pressure at home and abroad to step aside, Nuri al-Maliki dropped his bid for a third term as prime minister of Iraq on Thursday and pledged support for his replacement, moderate Shi'ite Haider al-Abadi.
Appearing on state television flanked by Abadi and other Shi'ite politicians, a grim-faced Maliki spoke of the grave "terrorist" threat from Sunni Islamic State militants before giving up his fight to stay on.
"I announce before you today, to ease the movement of the political process and the formation of the new government, the withdrawal of my candidacy in favor of brother Dr. Haider al-Abadi," said Maliki.
Abadi is seen as a far less polarizing figure that has a chance of uniting Iraqis against Sunni insurgents who have captured large parts of the country in the north and west - including Iraq's largest dam and five oil fields.
The announcement is likely to please the Sunni minority, which dominated Iraq under Saddam Hussein's iron-fisted rule but was then sidelined by the Shi'ite Maliki, a relative unknown when he came to power in 2006 with strong US backing.
The man who plotted from exile against Saddam for years drew comparisons with his former enemy, who had launched brutal crackdowns on Shi'ites and Kurds.
Critics accused Maliki of being an authoritarian leader with a sectarian agenda that drove Sunnis, including heavily armed tribes, into the Islamic State camp and revived a sectarian civil war.
Serving in a caretaker capacity since an inconclusive election in April, Maliki was digging in until the last minute, defying calls from Kurds, Sunnis, fellow Shi'ites, regional power broker Iran and the United States to give up.
Standing beside clerics, politicians and military officers - an apparent attempt to show Iraqis their leaders reached consensus for a change - Maliki drifted into conspiracy theories that often laced his speeches.
International and regional intelligence agencies had participated in provoking sectarian war by working with "local political forces which were providing political cover for terrorist organizations," he said.
Such accusations had already created tensions at a time when Iraqis craved united leaders who could end the growing menace of Islamic State militants who have swept through towns and beheaded and shot people in their drive to impose an Islamic empire.
The Kurds, who live mostly in a semi-autonomous region in the north, suspended their participation in the Shi'ite-led government after Maliki accused them of harboring terrorists.
Maliki's stubbornness had generated talk of a violent power struggle at the top.
"From the beginning I ruled out the option of using force, because I do not believe in this choice, which would without a doubt return Iraq to the ages of dictatorship, oppression and tyranny, except to confront terrorism and terrorists and those violating the will and interests of the people," Maliki said.
Even though the United States and Maliki's long-time ally Iran had lost patience with his rule, it seemed his fatal mistake was antagonizing Iraq's most influential cleric, Grand Ayatollah Ali al-Sistani.
Normally a recluse in the sacred Shi'ite city of Najaf, south of Baghdad, Sistani called on Iraqis to fight the Islamic State. He received a warm response, one indication that Maliki had lost touch with Iraqis.
Then Sistani used Friday prayer sermons to drive his message so clearly intended for Maliki - Iraqi politicians clinging to power is dangerous for the country.
A desperate Maliki sent delegations to try to persuade Sistani that only he could save the country, according to an Iraqi minister and a source close to Sistani's inner circle.
In the end, the ascetic 83-year-old, who has almost mythological stature for millions of followers in Iraq, took the unheard of step for a Shi'ite religious leader of his rank in demanding change in writing.
It was just a matter of time before Maliki had to go.
Relevant to your professional network? Please share on Linkedin
Think others should know about this? Please share