He spent a little more than three hours at a joint US and Iraqi air base to the west of Baghdad along with his wife Melania.
The couple posed for photographs with soldiers.
Trump even signed a few red-coloured Make America Great Again caps, brought to the event by service personnel – a controversial move as the military is not supposed to show any kind of political leaning.
Despite the wide grins and supportive cheers from his audience, the trip comes at a time of growing turmoil for the president at home and abroad.
One of the biggest rifts was caused by his sudden decision last week – against the advice of James Mattis, who quit as defence secretary as a result – to pull all US forces out of Syria.
The move was taken following a telephone call with President Erdogan of Turkey, with an apparent deal struck that would see the Turkish military handle the remnants of Islamic State, freeing up some 2,200 largely US special forces to head for the exit.
The problem, however, is that the US departure from northern Syria leaves Kurdish militias that were the main local force allied with the Americans in the fight against IS exposed to attack from Turkey, which views them as the enemy.
Mr Trump’s trip to Iraq offered an opportunity for the commander in chief to defend his policy.
Addressing troops from inside a hangar at the al-Assad air base, where a contingent of British forces are also located, he said: “There will be a strong, deliberate, and orderly withdrawal of US forces from Syria.”
He added: “While maintaining the US presence in Iraq to prevent an ISIS resurgence and to protect US interests, and also to always watch very closely over any potential reformation of ISIS and also to watch over Iran.”
The president also had a message for his allies – the United States was no longer going to be the world’s policeman.
He said: “If they want us to do the fighting, they also have to pay a price – and sometimes that’s also a monetary price – so we’re not the suckers of the world.”
Mr Trump has repeatedly railed against the majority of the 28 other members of NATO for failing to spend a minimum of 2% of national income on defence.
His outgoing defence secretary had been an ardent supporter of the alliance.
With Mr Mattis gone, the president might make good on past threats to quit the trans-Atlantic club.
Another battle on Mr Trump’s hands is with the Democrats over his desire to build a wall along the US border with Mexico.
A row over funding for this flagship policy – the most eye-catching pledge he made when running for president – has triggered a partial government shutdown, now in its fifth day.
Mr Trump wants $5billion (£3.95bn) in funding for the wall but the Democrats have said no.
Neither side so far looks as though they are willing to compromise.
The president chose to mention the stand-off in his address to the military.
He said: “I don’t know if you folks are aware of what’s happening.
“We want to have strong borders in the United States.
“The Democrats don’t want to let us have strong borders – only for one reason.
“You know why? Because I want it.”
Mr Trump will have to continue this fight upon his return to the White House.
Source: Read Full Article