BAGHDAD — A range of Iraqi politicians criticized President Trump on Thursday over his surprise visit to a United States military base in Iraq, and some called for a parliamentary debate on whether American forces should leave.

There was little expectation that Iraq’s Parliament would take any action in response to the visit, which had been arranged in strict secrecy for security reasons.

But the criticisms underscored the political delicacies surrounding the United States military’s deployment in the country, 15 years after the American-led invasion that toppled Saddam Hussein.

The angry reaction came a day after Mr. Trump and the first lady, Melania Trump, visited the Al Asad Air Base, where American forces are part of a coalition that has been battling Islamic State extremists. It was Mr. Trump’s first presidential visit to American troops stationed in an overseas trouble spot.