Iraqis stage protest against Shiite Haider al-Abadi
Iraqis carry portraits of Iraqi Prime Minister Nouri al-Maliki as they gather in support of him at the al-Firdevs square in Baghdad, Iraq on August 13, 2014. Getty Images

After eight years in office, Iraq's Prime Minister, Nouri al-Maliki, announced his decision to step down and endorse his successor, Haider al-Abadi, in order to "preserve unity" in Iraq.

He said: "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 favour of brother Dr. Haider al-Abadi."

In a speech that marks an end to weeks of political turmoil, Maliki said that he has withdrawn his legal complaint against his replacement, Haider al-Abadi's nomination, to form an inclusive government.

Maliki also indicated that he will not be seeking a future government post.

"I will stay a combat soldier to defend Iraq and its people," said Maliki, adding that his decision was solely made to "safeguard the high interests of the country".

Haidar Al Abadi
Newly elected parliament speaker Salim al-Juburi (C) stands between his deputies Haidar al-Abadi (L) and Aram Sheikh Mohamad (R). Getty Images

Maliki had been insisting on a third term and was defiant after Iraqi President Fouad Massoum had asked Abadi to succeed him earlier in the week.

He has been widely criticised for his authoritarian policies after failing to prevent the Islamic State insurgency in the north.

The news comes as a shock for Maliki supporters, who were reassured just a day earlier that he would not relax his grip on power until Iraq's high court rules in his favour.