Mr Trump and his wife made a visit to al-Asad airbase to meet military personnel in the base's restaurant.
White House Press Secretary Sarah Sanders tweeted that Trump's visit was made to thank troops for their service, success and sacrifice.
The editor's note at the top of the article reads, "On Wednesday, a day after this article was published, President Trump made a surprise visit to Iraq to greet the us troops". He stayed for a little more than three hours.
According to the White House pool report, the group was made up "of about 100 mostly US special operations troops engaged in combat operations in Iraq and Syria".
NBC5 Forecast: Storms return after Christmas | Weather
After two days of "quiet weather ", Wednesday will bring more snow to the Cascades, which received a lot this past weekend. Winds will relax heading into Christmas Day , and temperatures will generally warm into the upper 30s to lower 40s.
Trump has also taken flak from France and other foreign partners and senior figures in his own Republican party.
Mattis and other top advisers had cautioned Trump not to order a precipitous withdrawal from Syria, where roughly 2000 USA troops enabled a Kurdish-led militia to roll back the self-declared caliphate of the Islamic State.
Mr Trump is planning to pull half of the 14,000 United States military from Afghanistan, but United States forces are set to stay in Iraq.
The president has been criticized throughout his presidency for failing to travel to troops in the Middle East. "It would have been helpful at the beginning if he had said, 'Look, we're getting out of Syria because we have plenty of resources in Iraq to deal with the ISIS problem". It continues to experience sporadic bombings, kidnappings and assassinations, which most people attribute to IS.
Trump's visit - which is also his first to a combat zone as commander in chief - comes on the heels of his announcement about pulling troops out of Syria, and the rumored removal of thousands of troops in Afghanistan. "If we see something happening with ISIS that we don't like, we can hit them so fast and so hard" that they "really won't know what the hell happened". Since U.S. forces returned to Iraq in 2014, the base has played an important role in the fight against Islamic State because of its location.
Top Trump aide says government shutdown may go into New Year
Although tourists could still stroll along the Mall and visit its open-air sites, they found public restrooms closed. Trump said he was "waiting for the Democrats to come back and make a deal on desperately needed Border Security".
Trump left behind a slate of troubles in Washington, including a partial government shutdown and an unsteady economy.
Iraqi Prime Minister Adel Abdul-Mahdi recently said Iraqi troops could deploy into Syria to protect Iraq from threats across its borders.
He visited Afghanistan four times while in office. Iraq keeps reinforcements along its frontier to guard against infiltration by IS militants, who hold a pocket of territory along the Euphrates River.
The visit from Trump came during an especially tumultuous time for his presidency. The Pentagon is also said to be developing plans to withdraw up to half of the 14,000 American troops still serving in Afghanistan.
USA woman vanished on Thanksgiving Day, now fiance faces murder charges
Frazee has not spoken publicly but his attorney, Jeremy Loew, said last week that he was cooperating with law enforcement. Berreth went missing nearly a month ago after last being seen shopping with her 1-year-old daughter on Thanksgiving Day.