After 22 years on the federal bench, Shira Scheindlin said she wanted out of the judicial “straitjacket of not being able to speak out.” As the presidential campaign heated up, with immigration as the key issue for both candidates, the retired judge found her second act. “I knew immigrants were going to need the most help,” she told me.

At 71, Scheindlin is perhaps best known for her 2013 ruling that the New York Police Department’s stop-and-frisk policy constituted “indirect racial profiling.” But in the days after the election of Donald Trump she co-founded the American Immigrant Representation Project (AIRP). It aims to harness the power—and deep pockets—of the nation’s biggest law firms to assist undocumented immigrants facing deportation. With about $500,000 in donations so far, the group’s 150 volunteers have started representing detainees along the East Coast and will soon spread across the country.

AIRP works by recruiting lawyers from big law firms through their pro bono committees. Volunteers are assigned cases referred by overburdened legal services groups. And because corporate lawyers may lack experience in immigration law, they are trained and supervised by the Immigration Justice Campaign, a deportation defense initiative run by the American Immigration Council and American Immigration Lawyers Association.

“I know how important it is to have a lawyer. It makes all the difference,” Scheindlin told me from the 32nd-floor of the law firm Stroock & Stroock & Lavan, where she is now a senior attorney.

The cause is critical at a time when Trump has overseen a dramatic rise in arrests of undocumented immigrants. Unlike the Obama administration, where immigrants were usually targets for removal only if they had a criminal conviction or had recently crossed the border illegally, the Trump administration has abandoned these priorities and seems to be arresting undocumented individuals at random. And unlike criminal defendants, who are guaranteed lawyers at the taxpayers’ expense, undocumented immigrants facing deportation are not entitled to legal representation.

Nationwide, only about 37 percent of immigrants facing removal—and 14 percent of immigrants in detention—are able to secure representation, according to the American Immigration Council. This is due to barriers such as cost and the difficulty of obtaining an attorney once in detention. Immigrants with attorneys fare better at every stage of the court process: They’re four times more likely to be released from detention, 11 times more likely to seek legal relief, such as asylum, and twice as likely to be granted some sort of legal protection.

“We are not an anti-Trump effort,” Scheindlin explained from her office overlooking the Statue of Liberty. “It’s a pro-immigrant, right-to-counsel effort. Admittedly, we were energized by the election. Trump was saying he would get rid of all those murderers and rapists, which are his words for people who are undocumented. But of course, that isn’t true. Many of them are turnstile jumpers or marijuana possessors or driving on an expired license. These are all small things. Maybe they don’t even have a criminal record. But for them deportation is life-threatening.”

AIRP is one of several new legal-defense projects that have sprung up throughout the United States over the last year. Faced with an unpredictable president who has made immigrants the scapegoat for America’s ills, attorneys across the country—many of whom have never practiced in civil rights or immigration—are mobilizing to protect immigrants’ rights.

Many lawyers, for their part, feel their roles as client advocates and defenders of the rule of law have never been so important. “One would think protecting someone’s due-process rights isn’t an act of resistance,” said Dan Werner, supervising attorney for the Southern Poverty Law Center’s immigrant-justice initiative. “But sadly, in the current climate, it is.”

This spring, the SPLC, buoyed by record-breaking donations, set up the Southeast Immigrant Freedom Initiative (SIFI) to represent detained immigrants pro bono. SIFI now operates in three detention centers in Georgia and Louisiana and will start at a fourth later this winter. Lawyers come from as far as Seattle and San Francisco to volunteer in weeklong stints.

Another organization, Lawyers for Good Government, grew out of a Facebook group launched on election night and sent hundreds of lawyers to airports when Trump announced a ban on travelers from six Muslim-majority countries in January. It trained thousands more this fall when he announced the end of Deferred Action for Childhood Arrivals, an Obama-era program that protected nearly 800,000 undocumented youth from deportation.

Trump’s “Muslim ban” was the opening salvo in his war on immigration, ostensibly to protect national security and fulfill his campaign promise of “America first.” Signed just a week into his presidency, it prompted thousands of lawyers to rush to the nation’s airports. By now, images from that chaotic weekend are ubiquitous: lawyers hunched over their laptops in arrival halls, filing court motions on behalf of detained travelers as protesters chant for their release.

What seemed like a spontaneous mobilization actually began days earlier, as drafts of the order leaked out of Washington. “We realized that, if it was going to be signed in that form, some of our clients would already be on planes on their way here when it took effect,” said Julie Kornfeld, a legal fellow at the International Refugee Assistance Project (IRAP), a New York City–based refugee-advocacy group. IRAP quickly sent out a mass e-mail and Google spreadsheet calling for lawyers to volunteer at airports where those affected were scheduled to land. More than 8,000 signed up, and many more came of their own accord.

Kornfeld’s client, Haider Sameer Abdulkhaleq Alshawi, an Iraqi citizen, was detained that weekend in New York’s John F. Kennedy International Airport while en route to join his wife and child, who had entered the United States as refugees. IRAP, along with the American Civil Liberties Union and other legal-services groups, filed a series of petition for the release of Alshawi and others. He was let go after nearly 24 hours. “As soon as I saw him walking out of security, I was bawling,” Kornfield said. “When we walked outside after he was released, he saw the protesters. Despite everything, he still thought America was great. I told him, ‘All those people are here for you.’”

She added: “Everything that’s happened is horrible for our clients. It makes our work so much harder, but the silver lining is that our army has grown.”

Indeed, immigrant advocacy has “become one of the most galvanizing elements of the reaction to Trump,” said Muzaffar Chishti, director of the Migration Policy Institute at the New York University School of Law. “Immigration was a huge part of the president’s campaign and probably critical to his election. But ironically, he hit his first wall on immigration. And nothing galvanizes lawyers like a victory.”

We are now on the travel ban’s third iteration. Federal judges have mostly struck each one down, though court battles continue. The US refugee admissions program, however, has been cut by more than half to an unprecedented low of 45,000.

The same week the first travel ban was issued, Trump signed two more executive orders aimed at immigration enforcement. One ordered the construction of the wall that he promised on the election trail, more detention facilities, the deployment of immigration judges and asylum officers to the US-Mexico border, and the Department of Homeland Security to hire 5,000 additional border-patrol agents. The second directed the hiring of 10,000 new Immigration Customs Enforcement agents, threatened to strip federal funding to “sanctuary” jurisdictions, and vastly expanded enforcement priorities.

That’s what undocumented immigrants are up against. Because immigration is a civil matter, and not a criminal one, immigrants have no Sixth Amendment right to counsel. The government, meanwhile, is always represented by attorneys, creating an unfair playing field with high stakes for immigrants—namely, deportation to dangerous home countries. One immigration judge likened the system to “death-penalty cases heard in traffic-court settings.”

Getting a lawyer is even more important for those in detention. “The detainee calendar moves very quickly,” explained Werner, SIFI’s director. “That’s why we see such rampant due-process violations—because the whole notion is to get them churned through the system as quickly as possible.”

An increasing percentage of their clients have had no prior run-ins with the law and would have been low priorities for removal under Obama. “Now, anyone who is undocumented is a target,” Werner told me.

In federal immigration detention, detainees wear color-coded uniforms: Red is for “high-risk” detainees with serious convictions, orange is for non-felony crimes, and blue is for minor misdemeanors, such as traffic offenses. “We’re seeing a lot more people in blue uniforms than before,” Werner said.

Scheindlin’s group is focused on such low-level offenders, who are often eligible for bond, as well as asylum seekers who are newly arrived in the United States and were detained at a port of entry.

Municipal governments are also taking steps to protect their immigrant residents by helping to pay for lawyers. Following the example of New York City, which guarantees representation for undocumented detainees facing deportation, Chicago and San Francisco have their own multimillion-dollar legal defense funds. Such sums, Chishti said, would be “unheard of just two or three years ago.”

A study released November 9 shows that the New York Immigrant Family Unity Project has been a resounding success: With guaranteed lawyers, up to 12 times as many immigrants win their cases and are able to stay in the United States. The Vera Institute for Justice, which conducted the study, also just announced the Safe Cities Network, where 11 more cities are committing to providing lawyers for immigrants.

The groundwork for lawyers mobilizing under Trump has roots in the Obama administration.

The former president painted himself as a humanitarian focused on deporting only “felons, not families.” But he vastly expanded the machinery for deportation. Immigration advocates call Obama the deporter in chief: He pumped money into immigration enforcement and oversaw the removals of more than 2.5 million undocumented people, more than any other US president. He also expanded use of jail-like detention, particularly in 2014, when soaring numbers of Central Americans, most of them women and unaccompanied children, arrived at the southern border. Many were seeking asylum.

That prompted thousands of lawyers to step in. In 2014, the American Immigration Lawyers Association (AILA) started a pro bono project at a remote family-detention center in a New Mexico desert. Hundreds of lawyers, paralegals, and translators took turns volunteering for a week at a time. The project continues today at two detention centers in Texas and served as a model for SIFI.

Around the same time, legal-services groups and volunteer lawyers in cities across the country were mobilizing to help—free of charge—Central American unaccompanied children in immigration court.

Under Trump, immigration arrests are up compared to the Obama years. As ICE put it, Trump took the “handcuffs off of law-enforcement officers.” But deportations are down, at least for now. US immigration courts are backlogged with roughly 650,000 cases, and people wait, on average, 691 days to come before a judge. Those being deported quickly are usually new arrivals or had final deportation orders under Obama.

Meanwhile, Trump has also gone after immigrants’ lawyers. In April, the Department of Justice sent a cease-and-desist letter to the Seattle-based Northwest Immigrant Rights Project ordering it to stop its work helping unrepresented immigrants facing deportation. (Like many legal-services groups, NWIRP does not have capacity to represent everyone who needs it, so it offers lesser help, such as document preparation, to those representing themselves.) The move would have left thousands without any assistance and sent a chill throughout legal-services groups nationwide. A federal judge blocked the government’s order in July.

Separately, the Justice Department also asked for immigration judges to limit “continuances,” or postponed hearings. Though framed as a way to clear backlogs, immigration advocates say the move undermines immigrants’ right to a fair hearing by rushing cases along. “It’s a travesty of justice,” Matt Adams, the NWIRP’s legal director, told me. “It’ll cut a lot of people off from being able to find a lawyer when they’re locked up and going against a federal prosecutor arguing for them to be forcibly deported to countries from which they fled persecution.”

It remains to be seen, however, how long the enthusiasm of pro bono lawyers will last. The problem with immigration cases, according to Chishti, is that they’re not a one-shot deal. Cases sometimes take years and require dedicated lawyers to file time-sensitive reams of paperwork at each stage.

“The way immigration practice is organized, it requires sustained commitment,” he said. “And that’s difficult to guarantee in a court system where it takes a long time for your case to be processed.”

For now, resources and donations are still rolling in. The ACLU received $79 million in donations—over a third of its annual budget—in the three months after the election, while groups like the SPLC and American Refugee Council have seen big bumps, too. Much of that money goes to legal services. Scheindlin’s group, for its part, is planning another fundraising round in the near future.

Despite recent lawyer mobilizations, demand for legal representation for immigrants still far outstrips supply. But Scheindlin is focused on the little wins. “There’s that old saying that comes from the Talmud: You save a life, and you save the world,” she said. “Have we made a big-picture difference? Probably not yet. But if everybody tried, we’d all be better for it.”