By Maher Chmaytelli and Lin Noueihed

BAGHDAD/CAIRO (Reuters) - A global backlash against U.S. President Donald Trump's immigration curbs gathered strength on Sunday as several countries including long-standing American allies criticized the measures as discriminatory and divisive.

Governments from London and Berlin to Jakarta and Tehran spoke out against Trump's order to put a four-month hold on allowing refugees into the United States and temporarily ban travelers from Syria and six other Muslim-majority countries. He said the move would help protect Americans from terrorism.

In Germany - which has taken in large numbers of people fleeing the Syrian civil war - Chancellor Angela Merkel said the global fight against terrorism was no excuse for the measures and "does not justify putting people of a specific background or faith under general suspicion", her spokesman said.

She expressed her concerns to Trump during a phone call and reminded him that the Geneva Conventions require the international community to take in war refugees on humanitarian grounds, the spokesman added.

Merkel's sentiments were echoed in Paris and London; "Terrorism knows no nationality. Discrimination is no response," said French Foreign minister Jean-Marc Ayrault, while his British counterpart Boris Johnson tweeted: "Divisive and wrong to stigmatize because of nationality."

Along with Syria, the U.S. ban of at least 90 days affects travelers with passports from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen, including those with dual nationality that includes one of those countries.

Trump said his order, which indefinitely bans refugees from Syria, was "not a Muslim ban", though he added he would seek to prioritize Christian refugees fleeing the country.

The Arab League - whose members include many of the countries included in the ban as well as allies of Washington such as Saudi Arabia, Egypt and Jordan - expressed deep concern and said the restrictions were unjustified.

Story continues

The government in Iraq, which is allied with Washington in the battle against ultra-hardline Islamist group Islamic State and hosts over 5,000 U.S. troops, did not comment on the executive order.

But some members of its parliament said Baghdad should retaliate with similar measures against the United States.

IRAN VOWS TO RESPOND

In Baghdad, influential Shi'ite cleric Moqtada al-Sadr said American nationals should leave Iraq, in retaliation for the travel curbs.

"It would be arrogance for you to enter freely Iraq and other countries while barring to them the entrance to your country ... and therefore you should get your nationals out," he said on his website.

There was no immediate reaction to the curbs from Islamic State, although in the past it has used U.S. monitoring of Muslim foreigners to stoke Muslim anger against Washington.

The Tehran government vowed to respond in kind to the U.S. ban on visitors from Iran, but on Sunday Foreign Minister Mohammad Javad Zarif said on Twitter that Americans who already hold Iranian visas can enter the country.

"Unlike the U.S., our decision is not retroactive. All with valid Iranian visa will be gladly welcomed," Zarif said.

Authorities in Sudan, which is also targeted by the ban, summoned the U.S. charge d'affaires in Khartoum. They said the order sent a "negative message", coming two weeks after Washington announced it would ease economic sanctions on the country.

Trump's executive order on Friday took effect immediately, wreaking havoc and confusion for would-be travelers with passports from the seven countries and plunging America's immigration system into chaos.

The Department of Homeland Security said about 375 travelers had been affected by the order, 109 of whom were in transit and were denied entry to the United States. Another 173 were stopped by airlines before boarding.

Fuad Sharef, his wife and three children were among the first victims. They had waited two years for a visa to settle in the United States, selling their home and quitting jobs and schools in Iraq before setting off for a new life they saw as a reward for working with U.S. organizations.

They were prevented from boarding their connecting flight to New York from Cairo airport on Saturday, detained overnight and forced to board a flight back to northern Iraq.

'I AM TOTALLY BROKEN'

"We were treated like drug dealers, escorted by deportation officers," Sharef told Reuters, likening Trump's decision to the dictatorship of former Iraqi leader Saddam Hussein. "I am broken, I am totally broken."

A 32-year-old Syrian man, Nail Zain, was among dozens of people at Istanbul's Ataturk Airport prevented from flying to the United States on Sunday. He told Reuters he was supposed to fly to Los Angeles, but officials said his visa was canceled.

"My wife and my son are in the United States. My son has American nationality. And we have been waiting for this moment for two years. Finally when I got the chance, they prevented me as a Syrian passport holder from traveling," he said.

He was later taken out of the terminal by authorities.

Trump, a businessman who successfully tapped into American fears about militant attacks during his campaign, had promised what he called "extreme vetting" of immigrants and refugees from areas the White House said the U.S. Congress deemed high risk.

He said on Saturday of his order: "It's working out very nicely. You see it at the airports, you see it all over."

The travel curbs, however, also drew criticism from several other countries around the globe.

In Jakarta, Indonesian Foreign Minister Retno Marsudi said the Muslim-majority nation deeply regretted Trump's plans for "extreme vetting" of people from some Muslim countries.

Italian Prime Minister Paolo Gentiloni said "open society, plural identity, no discrimination" were the "pillars of Europe", while the Danish, Swedish and Norwegian governments also registered their opposition.

Danish foreign minister Anders Samuelsen tweeted: "The U.S. decision not to allow entry of people from certain countries is NOT fair."

Canadian Prime Minister Justin Trudeau said his country welcomed those fleeing war and persecution, even as Canadian airlines said they would turn back U.S.-bound passengers to comply with an immigration ban on people from seven Muslim-majority countries.

"To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith. Diversity is our strength #WelcomeToCanada," he tweeted.

(Additional reporting by Andrea Shalal and Andreas Rinke in Berlin, Elizabeth Piper and Paul Sandle in London, Andrew Callus in Paris, Yesim Dikmen in Istanbul, and Arwa Gaballa and Eric Knecht in Cairo; Writing by William Maclean and Pravin Char; editing by Ralph Boulton)