The man has since been released from custody, but at least 11 other immigrants and refugees remain detained at JFK.

Twitter: @NydiaVelazquez Hameed Khalid Darweesh after his release on Saturday.

An Iraqi man who risked his life working for US forces was among the first refugees and immigrants blocked at American airports on Friday night, as President Donald Trump's order halting arrivals from several Muslim nations came into effect. The executive ordered signed earlier on Friday temporarily halted the US refugee program for 120 days; indefinitely suspended the intake of refugees from Syria; and blocked all people from Syria, Iraq, Iran, Sudan, Somalia, Libya, and Yemen from entering the US for 90 days. The first legal challenge to Trump's action was filed on Saturday by the Iraqi man, Hameed Khalid Darweesh, and his compatriot, Haider Sameer Abdulkhaleq Alshawi. Both men had US visas and were in the air when the president signed the executive order and were then detained upon arrival. The news of the lawsuit was first reported by the New York Times. Darweesh was released from custody Saturday afternoon after being held for about 17 hours. He was flanked by Democratic Reps. Jerry Nadler and Nydia Velazquez, both of New York, and his lawyer, International Refugee Assistance Project attorney Mark Doss.

Pleased to announce w/@NydiaVelazquez the release of Hameed Jhalid Darweesh from detention at JFK.

Alshawi was also released later on Saturday evening, Nadler announced on Twitter.

Darweesh told reporters that despite his ordeal, he was happy to be in America, which he called the "land of freedom." He thanked those who had supported him, including those who had gathered to protest his detention at JFK.



"This is the soul of America," he said, speaking of his supporters. "This is what pushed me to leave my country and come here." Darweesh, a husband and father of three, worked as an interpreter for US forces in Iraq for a decade, and his life was targeted twice for doing so. He was granted a special immigrant visa for his work with the government on Jan. 20, according to a copy of the lawsuit obtained by BuzzFeed News.

Darweesh, his wife, and his children had been traveling together and are planning to go to Charlotte, North Carolina, to start their new lives in America. However, when Darweesh exited the plane at JFK he was detained by US Customs and Border Protection agents. His family was eventually able to leave the airport.



When lawyers for the two men arrived to the airport, they were unable to speak with their clients, the lawsuit stated. "When the attorneys asked 'Who is the person to talk to?' the CBP agents responded, 'Mr. President. Call Mr. Trump,'" the lawsuit said.

The other man named in the lawsuit, Haider Sameer Abdulkhaleq Alshawi, was coming to the US to join his child and wife, who are legal permanent residents living in Houston. He had been granted a visa to join them on Jan. 11.



Alshawi's wife had worked for a US security contractor as an accountant for about a year, the lawsuit states, along with her brother.



In 2010, Iraqi insurgents tried to kidnap Alshawi's brother-in-law and also targeted other family members. The family feared for their lives and applied for refugee benefits, which were granted to Alshawi's wife and their son in 2014. Alshawi has been waiting to join them ever since. He had not been released as of Saturday afternoon. Doss told CNN both of the men named in the lawsuit have been specifically targeted in their home country because of their affiliation with the US, and would be in "serious danger" if they were sent back.

"They're being persecuted," he said. "They're coming to the United States with a valid status. These are individuals who are supposed to be in the United States to be protected because they were persecuted and now they're being detained unlawfully."

The attorneys filed writs of habeas corpus in New York on Saturday morning seeking to get the men released. The lawyers also filed a motion for class certification that, if granted, would represent all refugees and immigrants being detained or turned away under the new order.



The lawsuit states that the detention of the men solely based on the executive order violates their Fifth Amendment rights to due process. “President Trump's war on equality is already taking a terrible human toll," Omar Jadwat, director of the ACLU’s Immigrants’ Rights Project, said in a statement. "This ban cannot be allowed to continue.”



On a call with reporters, Jadwat said that he only expects this type of litigation to increase.



"This is the start of, I think, a wave of litigation against the Muslim ban," he said.

Nadler told reporters he knows of at least 11 other people who have been detained at JFK over their immigration status since the order was issued. He tweeted he and Velazquez are working together to help the others get released.

With - now released - Iraqi Refugee blocked by Trump’s order at JFK. Working w/@NydiaVelazquez to help 11 more ref… https://t.co/Anqodse4I8