US President Donald Trump and First Lady Melania Trump have made an unannounced Christmas visit to US troops in Iraq.
They travelled there "late on Christmas night" to thank troops for "their service, their success and their sacrifice", the White House said.
Mr Trump said the US had no plans to pull out of Iraq.
The trip came days after Defence Secretary Jim Mattis quit over divisions about strategy in the region.
The US still has some 5,000 troops in Iraq to support the government in its fight against what remains of the Islamic State (IS) group.
However, a planned meeting between Mr Trump and Iraqi Prime Minister Adel Abdul Mahdi was cancelled. Mr Mahdi's office said it was because of disagreements on how to conduct the meeting.
A phone call between the two leaders was held instead and the White House said Mr Mahdi had accepted an invitation to visit Washington.
What happened during Trump's visit?
Mr Trump, his wife and National Security Adviser John Bolton travelled on Air Force One to al-Asad airbase, west of the capital Baghdad, to meet military personnel in the base's canteen.
It was his first visit to the region.
During the visit he got a standing ovation from troops as he entered a dining hall and walked around greeting them, posing for selfies and signing autographs.
He said the reason for the visit was to personally thank them for helping to defeat IS, adding: "Two years ago when I became president they were a very dominant group, today they're not so dominant any more. Great job."
The president told the soldiers he had secured a 10% wage increase for them, after learning their pay had been stagnant for "more than 10 years".
In fact armed forces personnel have received a pay rise in each of the past 10 years. The increase for 2019, approved by the president in August, will be 2.6%.
Mr Trump had planned to spend Christmas at his private golf club in Florida, but stayed behind in Washington because of the current partial government shutdown.
The visit to Iraq lasted about three hours. On the flight back, the president's plane refuelled at Ramstein Air Base in Germany and Mr Trump used the brief stopover to meet troops stationed there.
What did Trump say in Iraq?
"We're no longer the suckers, folks," he told American service personnel. "We're respected again as a nation."
Mr Trump said the US could use Iraq as a forward base if it "wanted to do something in Syria", Reuters news agency reports.
He defended his decision to withdraw US troops from Syria during the visit, saying: "A lot of people are going to come around to my way of thinking.
"I made it clear from the beginning that our mission in Syria was to strip Isis [another name for IS] of its military strongholds.
"Eight years ago, we went there for three months and we never left. Now, we're doing it right and we're going to finish it off."
Mr Trump also spoke of his conversations with Turkish President Recep Tayyip Erdogan which are believed to have influenced his decision to pull US forces out of Syria.
"I will tell you that I've had some very good talks with President Erdogan who wants to knock them [IS] out also and he'll do it. And others will do it too," Mr Trump said.
"We are in their region. They should be sharing the burden of costs and they're not."
He said there would be no delays in the withdrawal and added that the US could not "continue to be the policeman of the world".
"It's not fair when the burden is all on us, the United States," he said.
"We don't want to be taken advantage of any more by countries that use us and use our incredible military to protect them. They don't pay for it, and they're going to have to."
The president also said that security considerations had prevented him from visiting US troops in the region several weeks ago.
Why is withdrawing from Syria controversial?
Mr Trump announced the decision to pull US troops out of Syria last week.
However, important allies including senior Republicans and foreign powers have disputed the claim that IS is defeated in Syria and say the US withdrawal could lead to a resurgence.
In his resignation letter, Gen Mattis said he did not share Mr Trump's views.
One of the top US diplomats in the fight against IS, Brett McGurk, also resigned early. He reportedly described Mr Trump's decision as a "reversal of policy" that "left our coalition partners confused and our fighting partners bewildered".
A Kurdish-led alliance, the Syria Democratic Forces, has also warned that IS could recover.
US troops have helped rid much of Syria's north-east of the jihadist group, but pockets of fighters remain.