When word came down that, thanks to President Donald Trump's Friday executive order, visitors and would-be immigrants to the United States were being detained at airports across the country, an ad hoc contingent of lawyers sprang into action.

While thousands protested outside the nation's international airports, the lawyers' mission was simple: show up at airports, talk to families of detained travelers caught up in Trump's Muslim ban and offer legal services pro bono.

"We're trying to help detainees," Michelle Miao, a lawyer coordinating the efforts in New York City, said in an interview at John F. Kennedy International Airport on Saturday night. More than 80 lawyers were already hard at work, and Miao expected another twenty to join them before the night was over.

"This initiative is happening all over America," said Miao, of the lawyers who worked on airport floors, pooling laptops, printers and stray cups of coffee to produce petitions. "This is happening at O'Hare, and then there are the smaller airports."

On Saturday night, a federal judge issued a stay blocking the deportation of airport detainees with legal paperwork for U.S. entry. Excitement and jubilance washed through the massive crowds protesting at America's airport, including Terminal 4 at New York's Kennedy Airport.

The army of immigration lawyers, though, did not stop work. They did not go home. Their work was just beginning.

The stay only prevented deportations of detained travelers; those travelers are still not free to enter the U.S. Though some detainees have been released — all the detainees in Chicago and at least two in New York — untold numbers of would-be immigrants and visitors are still in detention at airports across the nation. On Saturday morning, at least 20 detainees were being held at Kennedy Airport alone, according to Melissa Trent, one of the volunteer attorneys.

"We're doing everything we can," Miao said. "We have attorneys here 24 hours a day, seven days a week."

A call to arms on behalf of refugees spurred the lawyers' coordinated efforts.

When the ban was announced, the International Refugee Assistance Project put out an email asking any immigration attorney available to find an airport and volunteer to take shifts; the first one began immediately. And then another from 8 p.m. to 4:30 a.m., and then until noon Sunday. More than 100 lawyers volunteered for the first round of duty.

The work would be difficult; many of the lawyers were flying blind. It was impossible to know how many visitors and immigrants were being detained at Kennedy Airport. No matter who spoke to the customs officials — congressmen, lawyers and officials from the mayor's office — there were no answers.

So the lawyers improvised.

After rushing to Terminal 7 on a rumor that 11 detainees were being held there, lawyers immediately dropped to the ground and started making signs saying "immigration lawyer." The hope was that families of detainees would see the sign and report their loved ones as absent — and let the lawyers take their cases.

Immigration lawyers make signs to identify themselves to stranded families at JFK. Jack Smith IV/Mic

Finding the detainees is just the first step in a long road of legal battles. The contingent of lawyers are largely charting new territory. The executive order denied entry to people who — by modern immigration standards — are legally allowed to enter the United States.

"I've never seen anything like this in my practice," Jonathan Mulligan, one of the volunteer immigration lawyers, said in an interview as he rushed to Terminal 7. "Maybe if we look back to Chinese exclusion laws in the 1800s" — referring to a law that barred immigration by Chinese laborers, which stayed on the books until the 1940s.

Once the attorneys identify a detainee, there are several legal avenues to pursue. The first is a habeas corpus petition, which calls for the detainee to be brought before a judge (this is the method the American Civil Liberties Union used to win the stay against the ban). Another tack is to get the detained immigrants a "credible fear interview," where those detained would seek asylum by claiming that it's too dangerous for them to return home.

While lawyers worked on the inside, thousands protested at JFK on Saturday night, chanting "Let them in!" Stephanie Keith/Getty Images

"For folks now in detentions, this is a shot at trying to get them some sort of status to get them in asylum proceedings," Marissa Ram, a volunteer lawyer who'd just returned from immigration work in Berlin, said in an interview on Saturday.

Once protesters dispersed and the ACLU announced the temporary stay, things were less hectic for the lawyers at Kennedy Airport — but they continued to work around the clock, lawyers on the ground said in phone interviews late in the evening.

"We're staying here and we're meeting flights and going to be here all weekend," Miao said. "People are intent on staying through the night, more attorneys will come fresh in the morning."