US President Donald Trump has made a surprise Christmas visit to Iraq and said he has "no plans at all" to remove US troops from the country.
He used the trip to defend his decision to pull U.S. forces from neighboring Syria.
"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's decision to withdraw U.S. forces from Syria stunned national security advisers and allies, including Iraq, and prompted the resignation of Defence Secretary Jim Mattis.
He said he wants to get U.S. soldiers home from Syria and that Iraq can still be used as a base to stage attacks on Islamic State militants if needed.
He told reporters traveling with him that if needed, the U.S. can attack the so-called (Islamic State) IS militants "so fast and so hard" that they "won't know what the hell happened."
Mr Trump said it's because of U.S. military gains that he can withdraw 2,000 forces from Syria.
"I made it clear from the beginning that our mission in Syria was to strip ISIS of its military strongholds," he told troops 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 that Turkish President Recep Tayyip Erdogan has agreed to take out "any remnants" of IS left in Syria.
"The U.S. 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.
Mr Trump is the third American president to visit Iraq.
His trip was shrouded in secrecy as his wife Melania accompanied him and was pictured with troops.
They made the 11-hour flight on a darkened Air Force One with lights off and window shades drawn plus military jet escorts.
Mr Trump told reporters he had planned to make the trip three or four weeks ago, but word of the trip started getting out and forced him to postpone it.
The president called it "pretty sad" that after all the U.S. has spent in the Middle East, his trip still had to be a surprise for safety's sake.
Walking around the Al Asad Air Base the president stopped and obliged servicemen and women who wanted to take selfies with him.
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 the IS group. IS has lost a significant amount of territory in Iraq and Syria but is still seen as a threat.
What are the implications of Trump's Syria decision for Iraq?
There are dire implications for neighboring Iraq.
The Iraqi government now has control of all the country's cities, towns and villages after fighting its last urban battles against IS in December 2017.
But its political, military and economic situation remains uncertain, and the country continues to experience sporadic bombings, kidnappings and assassinations, which most people attribute to IS.
Iraqi Prime Minister Adel Abdul-Mahdi recently said Iraqi troops could deploy into Syria to protect Iraq from threats across its borders.
Iraq keeps reinforcements along its frontier to guard against infiltration by IS militants, who hold a pocket of territory along the Euphrates River.
How does Trump's Syria decision compare to his predecessors' stance on 'foreign trouble spots'?
Trump campaigned for office on a platform of ending U.S. involvement in foreign trouble spots, such as Syria, Afghanistan and Iraq.
The Syria decision will ultimately affect all of the approximately 2,000 troops deployed in the war-torn country.
The Pentagon is also said to be developing plans to withdraw up to half of the 14,000 American troops still serving in Afghanistan.
During the presidential campaign, Trump blamed Democrat Hillary Clinton for the rise of IS, due to the withdrawal of U.S. troops from Iraq at the end of 2011 during her tenure as secretary of state.
President George W. Bush is the one who set the 2011 withdrawal date as part of an agreement with the Iraqi government to gradually shrink the U.S. footprint and slowly hand off security responsibilities to the government and Iraqi security forces.
His successor, President Barack Obama, wanted to leave a residual force in Iraq to help the government manage ongoing security challenges.
But he ultimately went ahead with the scheduled pullout in 2011 after Iraqi's political leaders rejected terms the U.S. sought for legal protections for the U.S. troops that would have remained.