It wasn’t love of terminals that drew Noam Biale back to Kennedy Airport last week.

Biale, 34, had been in Israel for his grandmother’s funeral — she had been a refugee after World War II — and landed Thursday morning just as drafts of President Donald Trump’s refugee executive order began to circulate. On Friday afternoon, Trump signed the paperwork.

Saturday Biale was back to JFK — one of dozens of attorneys who offered legal aid throughout the day to individuals unexpectedly stranded or barred from the country.

Immigrant advocacy organizations and regular New Yorkers pulled off the amazing feat of getting more than 1,000 people to protest by the parking lot outside Terminal 4. They chanted and exhorted elected leaders to let the refugees in. Inside the terminal, the lawyers were attacking the problem directly.

Organizations like the International Refugee Assistance Project had been gearing up for a fight, identifying attorneys prepared to pitch in around the country even before the executive order was issued. More than 1,600 attorneys signed on, says Julie Kornfeld, a fellow at IRAP. Larger organizations like the American Civil Liberties Union lent muscle.

Also present, in person or via phone: law students, such as those from Yale’s Worker and Immigrant Rights Advocacy Clinic. Some jumped in a car on Saturday and headed to the airport, says Carolyn Lipp, 24, a second-year law student. Many others worked behind the scenes in two rooms in the law school basement, busy with laptops, cellphones and a big white board to aid detainees and lawyers on the ground.

Working quickly, the lawyers filed paperwork preventing the removal of two named individuals, Hameed Khalid Darweesh and Haider Sameer Abdulkhaleq Alshawi, and others in the same situation. Lawyers also filed individual habeas corpus petitions for detainees.

That’s how Biale began his day at Kennedy, working on behalf of a woman whose husband and daughter were still in custody. Gathered around the woman’s luggage was a “whole range” of lawyers, Biale said, from a seasoned criminal litigator to younger professionals “just starting out.” Biale himself once interned for IRAP but is now an associate and pro bono coordinator at the firm Sher Tremonte LLP. Licensed in the Eastern District of New York, he was particularly useful for a technological reason: he has an electronic login to file federal court documents.

With a computer balanced atop the luggage cart and an iPhone’s hotspot, the group of lawyers filed a habeas petition on the client’s behalf. Those efforts were eventually superseded by the injunctions issued by courts around the country. An announcement of the first injunctions led to cheers outside the terminal, but frenzied work continued inside. Biale, for example, started working on behalf of an Iranian citizen who had been detained and told she was going to be sent home just before midnight despite the court order preventing such action.

“That sort of became the new crisis,” Biale says.

It came down to a race against time for the Iranian citizen, Vahideh Rasekhi, a doctoral student at Stony Brook University who spoke to reporters this weekend. Rasekhi told the lawyers by phone she was on a flight to Istanbul taxiing toward takeoff. Biale and the other lawyers reached out to an assistant U.S. attorney, the airlines, the U.S. Marshals and even stopped state troopers in the terminal. Something worked — the plane turned around and released the client, who was eventually released on Sunday.

The lawyers had multiple victories over the weekend, but problems persist.

At the heart of the problem is the lack of information coming from Customs and Border Protection, who have not been forthcoming about the number of people who have been or continue to be detained or have been deported nationwide. And the larger constitutionality of the order in general hasn’t been decided. Acting Attorney General Sally Yates, a holdover from the old administration, instructed her department Monday not to defend the order. Within hours, Trump replaced her.

A group of lawyers continued to work from Kennedy through Monday.

The NYCLU has received reports of individuals pressured to remove their applications for admission to the U.S., according to staff attorney Jordan Wells. Others have been turned away at foreign airports. Some appear to be detained here as well. Wells says the NYCLU is “monitoring the situation” to make sure the administration is complying with the court order, while the ACLU is preparing “broader litigation challenging the executive order.”

Many of the order’s victims will need legal representation, which may fall to the weekend’s makeshift coalition of lawyers to provide.

Students and private attorneys included. On Monday, Biale was settling into the regular work week, but planned to squeeze in a training session to learn about applications on special immigrant juvenile status — potential legal weapons should Trump rescind the DACA program, President Barack Obama’s executive order granting protection to undocumented minors.

Better to be prepared.