BAGHDAD — Embattled Iraqi Prime Minister Nouri al-Maliki announced late Thursday that he was relinquishing his post to his nominated replacement, ending a political deadlock that has plunged the country into uncertainty as it fights a Sunni militant insurgency.
Standing alongside senior members of his party, including rival Haider al-Abadi, Maliki said he was stepping aside in favor of his ‘‘brother,’’ in order to ‘‘facilitate the political process and government formation.’’
Maliki had been struggling for weeks to stay on for a third four-year term as prime minister amid an attempt by opponents to push him out, accusing him of monopolizing power and pursuing a fiercely pro-Shi’ite agenda that has alienated the Sunni minority. The United States, the UN and a broad array of political factions in Iraq had backed Abadi, saying only a new leader could unify a country under siege from Sunni extremists of the Islamic State group that have captured large swathes of Iraqi territory.
Maliki’s decision came as the crisis of the stranded Yazidi people appears to have ended, at least for the vast majority of those who had been at risk of death from exposure, hunger and thirst after they ran for their lives, only to find themselves trapped on a barren mountain.
Maliki said his decision to throw his support behind Abadi reflected a desire to ‘‘safeguard the high interests of the country,’’ adding that he would not be the cause of any bloodshed. ‘‘My position is your trust in me, and no position is higher than your trust,’’ he declared in a televised address.
Maliki’s refusal to give up his position after eight years in power had provoked a political crisis that escalated this week in Baghdad, where armed guards patrolled most major bridges, intersections and roadways.
The pressure intensified when his Shi’ite political alliance backed Abadi to replace him, and President Fouad Massoum nominated Abadi on Monday to form the next government. Maliki refused to step aside, threatening legal action against the president for what he said was a violation of the constitution.
‘My position is your trust in me, and no position is higher than your trust.’Nouri al-Maliki, Iraqi prime minister
But in a meeting of his party earlier Thursday, Maliki agreed to endorse Abadi as the next prime minister, according to two senior lawmakers from his State of Law parliamentary bloc — Hussein al-Maliki and Khalaf Abdul-Samad.
The lawmakers said Maliki also agreed to drop a suit challenging Abadi’s nomination.
The White House commended Maliki for backing Abadi and expressed hope that the power shift ‘‘can set Iraq on a new path and unite its people’’ against the threat from Islamic militants, national security adviser Susan Rice said in a statement.
Maliki had grown increasingly isolated as he was deserted not only by his Shi’ite allies but also top ally Iran, the United States and the UN-backed Abadi, who has 30 days to put together a Cabinet for parliament’s approval.
The UN Security Council urged Abadi to work swiftly to form ‘‘an inclusive government that represents all segments of the Iraqi population and that contributes to finding a viable and sustainable solution to the country’s current challenges.’’
The United States and other countries have been pushing for a more representative government that will ease anger among Sunnis, who felt marginalized by Maliki’s administration, helping fuel the dramatic sweep by the Islamic State extremist group that has seized large swathes of territory of northern and western Iraq since June.
The extremist Islamic State group’s lightning advance across much of northern and western Iraq has driven hundreds of thousands of people from their homes since June, and last week prompted the United States to launch aid operations and airstrikes as the militants threatened religious minorities and the largely autonomous Kurdish region.
The UN on Wednesday declared the situation in Iraq a ‘‘level 3 emergency’’ — a development that will allow for additional assets to respond to the needs of the displaced, said UN special representative Nickolay Mladenov, pointing to the ‘‘scale and complexity of the current humanitarian catastrophe.’’
The decision came after some 45,000 people, members of the Yazidi religious minority, were able to escape from a remote desert mountaintop where they had been encircled by Islamic State fighters, who view them as apostates and had vowed to kill any who did not convert to Islam.
The flood of Yazidi refugees across the bridge spanning the Iraqi-Syrian border had slowed to a drip by Thursday. Most of the tens of thousands who scrambled up Mount Sinjar to escape advancing militants have now climbed down. They are spilling across northern Iraq — sleeping in fields, cars and abandoned buildings — but at least they are safe for now.
Citing the improved conditions, President Obama called off plans for an evacuation of those left behind, saying that there was no need for such an operation.
‘‘The situation on the mountain has greatly improved, and Americans should be very proud of our efforts,’’ he said. ‘‘We helped vulnerable people reach safety, and we helped save many innocent lives.’’
‘‘We broke the ISIL siege of Mount Sinjar,’’ he added, using an acronym for the Islamic State militants whose capture of the northwestern town of Sinjar on Aug. 3 triggered the exodus of the Yazidis.Material from the Washington Post was included in this report.