IRAQ'S most influential cleric, Grand Ayatollah Ali al Sistani, has thrown his weight behind the new prime minister, calling for national unity to contain sectarian bloodshed and an offensive by Islamic State militants that threatens Baghdad.

Speaking after Nouri al Maliki finally stepped down as prime minister under heavy pressure from allies at home and abroad, the spiritual leader of Iraq's Shi'ite majority said the handover to Mr Maliki's party colleague Haider al- Abadi offered a rare opportunity to resolve political and security crises.

Iraq has been plunged into its worst violence since the peak of a sectarian civil war in 2006-2007, with Sunni fighters led by the Islamic State over-running large parts of the west and north, forcing hundreds of thousands to flee for their lives and threatening the ethnic Kurds in their autonomous province.

Mr Sistani told the country's feuding politicians to live up to their "historic responsibility" by cooper-ating with Mr Abadi as he tries to form a government and overcome divisions among the Shi'ite, Sunni and Kurdish communities that deepened as Mr Maliki pursued what critics saw as a sectarian Shi'ite agenda.

Mr Abadi urged his countrymen to unite and cautioned the road ahead would be tough. Mr Maliki ended eight years in power late on Thursday standing next to his successor.