President Donald Trump and first lady Melania Trump made a surprise visit to Iraq Wednesday, his first trip overseas to visit troops in a conflict zone since taking office.

The president landed at Al-Asad Air Base and took photos with troops there.

The visit comes just days after Trump announced he would withdraw all of the estimated 2,200 U.S. forces deployed in Syria. That decision was part of the reason behind the high-profile resignation of Defense Secretary Jim Mattis last week.

During the visit, Trump defended his Syria decision, telling troops that the U.S. presence in Syria was never to be “open-ended,” and that Turkey has agreed to eliminate remnants of Islamic State fighters still remaining in the country.

Trump also said other nations must increase their financial commitments to rebuild Syria.

“The nations of the region must step up and take more responsibility for their future,” Trump told the assembled troops, and added there would be a “strong, deliberate and orderly withdrawal” of U.S. forces from Syria.

Trump also told the forces assembled at the air base west of Baghdad that he had no plans to withdraw forces from Iraq.

According to the numbers the Pentagon reports publicly, there are about 5,200 troops still in Iraq after U.S., coalition and Iraqi forces completed combat operations against the Islamic State last year.

The troops remain there “as part of international Coalition efforts to provide training and assistance to Iraqi Security Forces to enable Iraqi efforts to ensure the enduring defeat of ISIS,” said Pentagon spokesman Navy Cmdr. Sean Robertson.

Trump made the 11-hour flight on a darkened Air Force One with lights off and window shades drawn. plus military jet escorts.

He says he’s never seen anything like it.

The Associated Press contributed to this report.