US soldiers watch Trump give a speech in Iraq at US airbase.

US President Donald Trump delivers remarks to US troops in an unannounced visit to Al Asad Air Base, Iraq, Dec. 26, 2018. 

Credit:

Jonathan Ernst/Reuters

President Donald Trump made a surprise Christmas visit to US troops in Iraq on Wednesday, his first trip to a conflict zone nearly two years into his presidency and days after announcing a pullout of American troops from Syria.

Air Force One touched down at the Al Asad Air Base west of Baghdad after an overnight flight from Washington with first lady Melania Trump, a small group of aides and Secret Service agents, and a pool of reporters. He was expected to stay for around three hours.

Trump has drawn fire from some in the US military for not having visited US troops in conflict zones since taking office in January 2017, particularly after he canceled a trip to a World War I cemetery in France last month due to rain.

While there has been no full-scale violence in Iraq since ISIS suffered a series of defeats last year, US troops train and advise Iraqi forces still waging a campaign against the militant group.

On his way home from Iraq, he will also stop to visit troops at Ramstein Air Base in Germany.

Trump was looking for some positive headlines after days of turmoil over his decisions to withdraw all US troops from Syria, pull out half of the 14,000-strong contingent in Afghanistan, and push out Defense Secretary James Mattis two months earlier than planned for criticizing his policies.

Related: Defense chief Mattis resigns after clashing with Trump on policies

Many Republican and Democratic lawmakers have heaped scorn on Trump for his sudden order last week to withdraw from Syria.

On his stop in Iraq, he defended his decision to pull out the 2,000 troops from Syria, which he has said was made possible by the defeat of ISIS militants.

His critics have said that fight is far from over and the withdrawal leaves allies in the lurch.

One of those critics was Mattis, who said in a candid resignation letter last week that his views did not align with the president's, particularly in regard to the treatment of US allies. Mattis had planned to leave at the end of February but Trump forced him to go on Jan. 1 after his resignation letter.

Related: Mattis letter points to 'weakest aspects' of Trump's foreign policy

Trump has also faced negative headlines for wanting to pull troops from Afghanistan where they have been since 2001. Trump has questioned how long troops there should have to remain in what has become America's longest war.

Trump's unannounced visit to Iraq followed in the footsteps of two of his predecessors, Republican George W. Bush and Democrat Barack Obama, who both made surprise trips to see troops.

The US military says it has about 5,200 troops in Iraq, focused on training and advising Iraqi troops to ensure that ISIS does not re-emerge.

NATO defense ministers agreed in February to a bigger "train-and-advise" mission in Iraq after the US called for the alliance to help stabilize the country after three years of war against ISIS. 

Related: Turkey to delay Syria operation as ISIS mounts attack

Trump has had an uneven relationship with America's military. He did not have to serve during the Vietnam War after being diagnosed with bone spurs in his heels.

As president-elect, Trump was drawn to the brawn of the armed forces and stacked his first Cabinet with generals, many of whom have since left his administration.

Trump has also wanted to end protracted US involvement in overseas conflicts and to force allies to pay more for the costs that he says fall disproportionately on American taxpayers.