BAGHDAD - Iraq moved closer to turning the page on Nuri al-Maliki's reign when an alternative prime minister was named Monday to steer the country out of a raging war and save it from breakup.
"The country is in your hands," President Fuad Masum told Haidar al-Abadi after accepting his nomination by parliament's Shiite bloc, in a move immediately welcomed by the United States.
Washington had warned Maliki against stirring trouble after the two-term premier gave a defiant midnight television address suggesting he was ready to fight for his job to the very end.
Haidar al-Abadi was somewhat of a dark horse in the months-long political wrangling over who should be nominated for prime minister after April elections.
The coalition headed by Maliki, who has been prime minister since 2006, won the vote comfortably but his increasingly sectarian policies were seen as partly responsible for the violence that has gripped Iraq recently.
People in a Sunni neighbourhood of the city of Baquba gathered in the street and fired shots in the air to celebrate Maliki's defeat.
"The United States stands ready to fully support a new and inclusive Iraqi government," Brett McGurk, the US deputy assistant secretary of state for Near Eastern, said.
A Shiite politician considered close to Maliki, Abadi was born in Baghdad in 1952 and returned from British exile in 2003 when US-led forces toppled Saddam Hussein.
US President Barack Obama, who on Thursday sent warplanes back into the skies over Iraq to halt a devastating jihadist advance in the north, had repeatedly stressed that any viable solution to Iraq's woes would have to start with the formation of a new government.
Maliki's last stand
It had become clear in recent weeks that Maliki had lost support from Washington. Gradually, all his other erstwhile allies followed: Iran, the Shiite clergy and even his own Dawa party.
Moments before Maliki spoke on television, special forces, soldiers and police deployed across Baghdad, especially around the Green Zone district housing the country's key institutions.
Several of the capital's main thoroughfares and bridges were closed to traffic and on Monday morning unusual numbers of security personnel, uniformed and plain-clothed, remained deployed across the city.
His television address, in which he vowed to sue Masum for failing to choose him as prime minister, had dispelled any hope he would step down gracefully.
On Monday afternoon, even as the president shook hands with Abadi, Maliki sent his supporters to protest on Baghdad's main square.
As the long-running political deadlock was broken, there was no let-up in the violence that wracked Iraq since Sunni extremist militants launched an offensive on June 9.
Islamic State (IS) jihadist fighters wrested control of the town of Jalawlab from Kurdish peshmerga troops, who have been stretched thin along a 1,000-kilometre front.
They have struggled to defend their own autonomous region from jihadist attacks and France asked Monday for a European-wide mobilisation to provide the peshmerga with much-needed weaponry and ammunition.
The Kurds have long complained that Maliki was not sending them their 17 per cent share of federal oil resources.
Kurdish peshmerga fighters then seized long-coveted areas over which they were in dispute with Baghdad, including the oil-rich Kirkuk region, when routed federal forces retreated in the face of the jihadist onslaught two months ago.
Arms for Kurds
That prompted Maliki to accuse the Kurdistan Regional Government of siding with the Islamic State (IS) group and the "caliphate" it declared in late June over parts of Iraq and Syria.
Cash-strapped Kurdistan's troops initially fared better than Baghdad's but over the past week jihadists made spectacular gains, seizing the country's largest dam and advancing within striking distance of the Kurdish capital.
That was one of the reasons that prompted US President Barack Obama to announce on Thursday he was sending warplanes back over the skies of Iraq for the first time since the last US troops withdrew in 2011.
His other justification was the risk of an impending genocide against the Yazidi minority, many of whose people had been stranded on a mountain following an Islamic State attack.
Three days of strikes by US jets and drones appeared to make an impact on both fronts, raising hopes that US intervention could turn the tide on two months of jihadist expansion.
"The peshmerga have liberated Makhmur and Gwer," peshmerga spokesman Halgord Hekmat told AFP, adding that "US aerial support helped".
Meanwhile, officials said 20,000 mostly Yazidi civilians who had been trapped on Mount Sinjar since jihadists overran their hub of Sinjar a week ago had managed to escape.
They were escorted through Syria and back into Iraqi Kurdistan by Kurdish forces and added to the more than 200,000 displaced persons who have already entered the autonomous region since August 3, according to figures provided by several aid groups.