BREAKING UPDATE: FEDERAL JUDGE GRANTS STAY AGAINT TRUMP TRAVEL RESTRICTIONS

NEW YORK — Two Iraqi men with ties to the United States military who were detained at JFK Airport have filed a lawsuit against President Donald Trump Saturday.

Earlier, one of the refugees, Hameed Khalid Darweesh, was released nearly 24 hours after he was detained, according to Rep. Nydia Velazquez. and Rep. Jerry Nadler. By Saturday evening, Haider Sameer Abdulkaleq Alshawi had been released.

The class-action lawsuit could be the first to challenge President Trump's controversial executive order limiting the amount of refugees entering the United States.

Saturday night the ACLU were in court arguing for a nationwide stay to block deportation of people stranded in airports.

Gov. Andrew Cuomo has ordered state agencies "to explore all legal options" to assist what are believed to be 10 refugees under detention at Kennedy Airport following President Donald Trump's executive order to cut down on immigration from Muslim-majority countries.

"I never thought I'd see the day when refugees, who have fled war-torn countries in search of a better life, would be turned away at our doorstep. We are a nation of bridges, not walls, and a great many of us still believe in the words 'give me your tired, your poor, your huddled masses...' Cuomo said in a statement.

"I have directed the Port Authority, the Department of State, and my Counsel's Office to jointly explore all legal options to assist anyone detained at New York airports, and ensure that their rights are protected. America is a nation of laws and those laws provide rights that must be respected and followed regardless of political ideology."

One of the refugees, Hameed Khalid Darweesh, has been released pic.twitter.com/U1XHr4DaTt — Rep. Nydia Velazquez (@NydiaVelazquez) January 28, 2017

Lawyers for two detained Iraqi men told the New York Times that Darweesh worked on behalf of the U.S. government in Iraq for 10 years. The other man, Haider Sameer Abdulkhaleq Alshawi, was coming to the U.S. to join his wife, who works for a U.S. contractor, and their son.

Both men arrived at separate flights when they were detained, just as Trump's executive order that banned citizens and refugees from 10 Muslim-majority countries and Syrian refugees from coming to the U.S. went into effect.

New York reps. Jerry Nadler and Nydia Velazquez, who was by Darweesh's side when he was released, issued a statement demanding officials to release the 11 others who were detained at JFK airport.

“Today, we saw in real human terms the damage and the absurdity of Trump’s policies. The president’s executive order is mean-spirited, ill-conceived, and ill-advised. The order almost banned a man from entering the country who has worked for the United States government for 10 years, who risked his life to help us and to help our troops, and who loves our country. Thankfully, we did not sit idly by. We took action. We demanded his release, and the release of the others who are being unlawfully detained. We are pleased to announce that Hameed Khalid Darweesh has been released and can now be reunited with his family. “This should not happen in America. We shouldn’t have to demand the release of refugees one by one. We must fight this executive order in the streets, in the courts, anywhere, anytime. We must resist. We must fight. We must keep working to keep America the land of the free and the home of the brave.”

Darweesh told reporters after being released that America is "the land of freedom."

Early Saturday, the lawyers for the two men filed a writ of habeas corpus in the Eastern District of New York asking to have their clients released, according to the New York Times. They've also filed a motion for class action status in an effort to represent all refugees and immigrants who said they were unlawfully detained at airports and other ports of entry.

According to court papers, both men legally were allowed to come into the US but were detained because of the executive order signed Friday, as reported by CNN. Under that order, Iraqi citizens are not allowed to come into the US for 90 days. The lawyers are asking for a hearing because they maintain the detention is illegal because the men had valid visas.

Just outside of the arrivals area at JFK's Terminal 4, hundreds of demonstrators gathered to protest Darweesh and Alshawi's detention and against Trump's executive order.

The executive order that went into immediate effect Friday night caused refugees in flight and on the way into the U.S. to be stopped and detained once they landed. Trump's order suspends entry of all refugees to the U.S. for 120 days. Entrance of Syrian refugees has also been suspended indefinitely, and those from seven predominantly Muslim countries are barred from entry for 90 days. Those include Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen.

The order also prioritizes Christian refugees over Muslims.

It's still unclear how many refugees have been detained nationwide as of Saturday, but complaints have been filed by the American Civil Liberties Union, the International Refugee Assistance Project at the Urban Justice Center, the National Immigration Law Center, Yale Law School's Jerome M. Frank Legal Services Organization and the firm Kilpatrick Townsend & Stockton, according to the Times.

The order has also created panic for families and a mess of legal problems for those detained.

Cairo airport officials said five U.S.-bound Iraqi migrants from one family who were stopped while boarding an EgyptAir flight to JFK airport would return to Iraq. The family members will spend Saturday night at Cairo airport and leave for Irbil, capital of Iraq's Kurdish region, Sunday morning.

Another U.S.-bound migrant, a Yemeni national, who was also at the airport and return to Cairo, where he resides.