The US President told personnel that Syria's neighbouring nations will fund the rebuilding of the country (Picture: US Department of Defense).
President Donald Trump used a surprise visit to Iraq to defend his decision to withdraw US forces from Syria where they have been helping battle so-called Islamic State (IS) militants.
The US President has now returned to the United States after his first visit to a conflict zone abroad.
"We're no longer the suckers, folks," Mr Trump told American servicemen and women at a base in western Iraq.
"We're respected again as a nation."
Mr Trump said it was because of US military gains that he can withdraw 2,000 forces from Syria.
During his first visit to a troubled region, Mr Trump also said he has no plans to withdraw US forces from Iraq.
"I made it clear from the beginning that our mission in Syria was to strip ISIS of its military strongholds," Mr Trump told troops clad in fatigues at al-Asad Airbase west of Baghdad.
"Eight years ago, we went there for three months and we never left," he said.
"Now, we're doing it right and we're going to finish it off."
He said Turkish President Recep Tayyip Erdogan had agreed to take out "any remnants" of IS left in Syria.
The US presence in Syria was not meant to be "open-ended", he said, adding that other wealthy nations should pay for rebuilding Syria.
"The nations of the region must step up and take more responsibility for their future," said Mr Trump, who said there would be a "strong, deliberate and orderly withdrawal" of US forces from Syria.
The visit to Iraq was unannounced.
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.
The US President said "American shouldn't be doing the fighting for every nation on Earth".
It comes a week after Mr Trump stunned his national security advisers by announcing that he would withdraw US troops from neighbouring Syria where they have been fighting Islamic State militants.
Mr Trump's decision to remove personnel from Syria rattled allies around the world, including in Iraq.
His wife Melania accompanied him on the visit to Iraq 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.
Fifteen years after the 2003 invasion, the US still has more than 5,000 troops in Iraq supporting the government as it continues the fight against remaining pockets of resistance by IS, also known as Daesh.
IS has lost a significant amount of territory in Iraq and Syria but is still seen as a threat.
The UK has been fighting IS for more than four years in the form of Operation Shader - Britain's contribution to the fight against Daesh.
Since 2014, British soldiers have trained 75,000 members of the Iraqi security forces at Camp Taji and at other bases across the country as part of the battle to defeat IS.
Mr Trump, who speaks often about his support for the American military, had faced criticism for not having visited US troops stationed in combat zones as he nears his two-year mark in office.
The president made a second unannounced visit to US troops abroad on his way back from Iraq, stopping at Ramstein Air Force Base in Germany for refuelling and to see service members there.