President Donald Trump has made an unannounced visit to Iraq.

He left behind a partially shut down US government to greet troops helping hold off extremists in a country where thousands of Americans died during the recent war.

It comes a week after Mr Trump stunned his national security advisers by announcing that he would withdraw US troops from neighboring Syria where they have been fighting Islamic State militants.

US defense secretary Jim Mattis abruptly resigned following the announcement, and Mr Trump’s decision rattled allies around the world, including in Iraq.

Mr Trump’s trip was shrouded in secrecy. His wife Melania accompanied him and was pictured with troops.

Air Force One flew overnight from Washington, landing at an airbase west of Baghdad under the cover of darkness on Wednesday evening.

It is his first visit with troops stationed in a troubled region.