Kerry called on Iran to help end the wars raging in Yemen and Syria.

BAGHDAD (AFP) - US Secretary of State John Kerry made an unannounced visit to Baghdad on Friday for talks with top Iraqi officials on the war against the Islamic State militant group.

Kerry will meet Prime Minister Haider al-Abadi, Foreign Minister Ibrahim al-Jaafari, and Nechirvan Barzani, the prime minister of Iraq’s autonomous Kurdish region, State Department spokesman John Kirby said.

He will "underscore our strong support for the Iraqi government as it addresses significant security, economic, and political challenges," Kirby said.

Iraq is battling IS, which overran swathes of territory north and west of Baghdad in 2014, in a campaign that has been hit hard by plummeting world prices for oil, on which it relies for the vast majority of its revenues.

Abadi is also seeking to replace the current cabinet with a government of technocrats, a move that has faced opposition from powerful parties and politicians that rely on control of ministries for patronage and funds.

Kerry, who is visiting Iraq for the first time since September 2014, will "discuss the (US-led) coalition’s continued support for Iraqi-led efforts against" IS, Kirby said.

US-led strikes and training have helped Iraqi forces regain significant ground from the militants both north and west of Baghdad.

The top US diplomat travelled to Iraq after visiting the small but strategic Gulf kingdom of Bahrain, where he held talks with Gulf Arab foreign ministers on the conflicts in Iraq, Syria and Yemen.

Kerry called on Iran to help end the wars raging in Yemen and Syria, where Tehran and its Gulf Arab rivals are backing opposing sides.