An Iraqi immigrant was freed Saturday after being detained overnight at one of New York’s airports in the wake of President Trump’s latest executive action on immigration.

Hameed Khalid Darweesh appeared outside John F. Kennedy International Airport Saturday afternoon with two members of Congress.

“America is the greatest nation, the greatest people in the world,” Darweesh told reporters.

Darweesh worked as an interpreter for the U.S. Army when it invaded Iraq in 2003. Later he was a contract engineer for the U.S. He was granted permission to relocate to the U.S., but was detained along with another traveler from Iraq after arriving at Kennedy Airport Friday night.

Get Breaking News Delivered to Your Inbox

Lawyers petitioned a federal court early Saturday to let them go. Two Democratic U.S. Representatives, Nydia Velazquez, D-New York, and Jerrold Nalder, D-New York, were at the airport trying to get 11 other detainees released. Nadler and Velazquez appeared with Darweesh outside the airport.

Iraqi immigrant Hameed Darweesh, center, walks out of Terminal 4 with U.S. Rep. Jerrold Nadler and U.S. Rep. Nydia Velazquez after being released at John F. Kennedy International Airport in Queens, New York, Jan. 28, 2017. Reuters/Andrew Kelly

In an interview with CBS News senior investigative producer Pat Milton, Nadler said he was told by U.S. customs officials that a total of 12 people had been detained and one of the 12 was released. It was his understanding that all 11 were being held at JFK airport.

Nadler said that number could grow as more planes land. Nadler said these are people with valid visas who were already on planes in the air when the executive order was signed.

He said the executive order Mr. Trump signed on Friday “is either pure stupidity or being done for public relations.” He said it has had “severe human consequences” and has affected the reputation of the United States.

Nadler said he was working to try to get the detainees freed and will try to bring pressure to have the executive order revoked.

On Friday, Mr. Trump temporarily barred entry to the U.S. for all refugees and citizens of seven Muslim majority nations: Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen.

Senior administration officials told CBS News Saturday that for permanent American residents -- those holding green cards -- from the listed countries, their readmittance to the U.S. will be done on a “case by case exemption process.”

Customs and Border Protection was notifying airlines about passengers whose visas had been canceled or legal residents scheduled to fly back to the U.S., and the airlines were being told to keep them off those flights.

In Somalia, people are reacting with dismay and warnings that countries could retaliate against the United States’ new immigration and visa policies with restrictive policies of their own.

“I am shocked beyond words. This will mean that my new husband will never be able to join me in the U.S.,” said Fatima Ashkir, a Somali-American woman from Florida who came to Mogadishu to marry her Somali boyfriend.

Others say they are not surprised at Mr. Trump’s executive order.

“His intentions of hurting rather than to help were clear from the very beginning,” said Ahmed Abdullahi, a university student in Mogadishu. “But you have to know that this will have a serious effect on relations between Americans and the Muslim world. A tit-for-tat response by Muslim countries, in which Americans could be barred from entering countries affected, is likely to be seen.”

Iran’s foreign ministry is suggesting the country will limit issuing visas to American tourists in retaliation for Mr. Trump’s suspension of immigration and visas for nationals from Muslim countries including Iran. The official IRNA news agency Saturday carried a statement by the Iranian foreign ministry that says Iran will resort to “counteraction” to Mr. Trump’s executive order.

“Iran, to defend the dignity of the great Iranian nation, will implement the principle of reciprocity until the removal of the insulting restriction against Iranian nationals,” the statement says.

“It will apply corresponding legal, consular and political actions,” the statement adds.

In Cairo, airport officials say five U.S.-bound Iraqi migrants from one family who have been prevented from boarding an EgyptAir flight to New York’s JFK airport would return to Iraq. They said the five will spend Saturday night at Cairo airport and leave for Erbil, capital of Iraq’s Kurdish region, Sunday morning. They added that the sixth U.S.-bound migrant, a Yemeni national, left the airport to return to Cairo, where he resides.

The officials said Saturday’s action by the airport was the first since Mr. Trump signed Friday’s order.

The officials said the six migrants, escorted by officials from the U.N. refugee agency, were stopped from boarding the plane after authorities at Cairo airport contacted their counterparts in JFK airport. The officials spoke on condition of anonymity because they were not authorized to brief the media.

Dutch airline KLM says it has had to turn away seven would-be passengers because they would no longer have been accepted into the United States.

Manel Vrijenhoek, at KLM’s press office, said: “We would love to bring them there. That’s not the problem. It’s just that this is what the U.S. sprang on the rest of the world - that these people are no longer welcome.”

She said the seven were due to fly with KLM from different airports around the world. Vrijenhoek said she had no specifics on their nationalities, although she confirmed they were from countries affected by the ban.