Homeland Security Secretary Alejandro Mayorkas issued broad new directives to immigration officers Thursday saying that the fact that someone is an undocumented immigrant “should not alone be the basis” of a decision to detain and deport them from the United States.

The Biden administration will continue to prioritize the arrest and deportation of immigrants who pose a threat to national security and public safety and those who recently crossed a border illegally into the United States, Mayorkas said in an interview.

Mayorkas said Immigration and Customs Enforcement (ICE) officers should not attempt to arrest and deport farmworkers, the elderly and others who were vulnerable to deportation under the Trump administration, which allowed agents to arrest anyone in the United States illegally. He also said agents should avoid detaining immigrants who land on their radar because they spoke out against “unscrupulous” landlords or employers, or at public demonstrations. The new rules take effect Nov. 29.

“The overriding question is whether the noncitizen poses a current threat to public safety,” Mayorkas wrote in a memo to immigration and border agency heads Thursday.

“Are we going to spend the time apprehending and removing the farmworker who is breaking his or her back to pick fruit that we all put on our tables?” Mayorkas said in the interview. “Because if we pursue that individual, we will not be spending those same resources on somebody who does, in fact, threaten our safety. And that is what this is about.”

But he also granted ICE agents far more discretion to decide whether to deport someone than officials did in the agency’s interim guidance Feb. 18, which required supervisors to sign off on some deportation cases to make sure agents followed the rules.

Mayorkas said he would monitor data showing agents’ compliance with the guidelines but would not micromanage them.

“I do trust the ICE workforce, and I do trust ICE leadership, and I do have confidence in my own leadership and the efforts that I have made engaging with the ICE workforce and discussing with them these very issues,” he said.

Mayorkas issued the new instructions to immigration agents at a critical juncture for the 11 million undocumented immigrants in the United States, most of whom have lived here for years, and for the controversial federal agency in charge of enforcing the immigration laws.

President Biden has pledged to fight for a path to citizenship for undocumented immigrants this year, but talks with Republicans have collapsed amid a new influx of migrants at the southwest border, and the Senate has hit back-to-back roadblocks in its effort to include a legalization process in the budget, with the Senate parliamentarian rejecting another proposal this week.

The left wing of the Democratic Party has called for officials to abolish ICE, saying it is secretive and difficult to monitor. Hundreds of state and local jurisdictions are so wary of the agency — saying they have sought to remove people who do not pose a threat, such as minivan-driving parents or relatives of people in the military — that they have limited their police and jails from working with them.

Republicans have slammed ICE for a dramatic drop in immigration arrests this year and filed lawsuits against the Biden administration, alleging that it has abdicated its responsibility to enforce federal immigration laws. Immigration arrests fell from 6,000 in December to 3,600 in August, according to ICE data.

In August a federal judge in Texas blocked ICE’s Feb. 18 priorities, calling them “suffocating,” though an appeals court has since largely let them take effect as the lawsuit proceeds.

Mayorkas said he is seeking to redirect ICE’s public safety mission by training agents in the use of “prosecutorial discretion,” in which they weigh pros and cons in determining whether to detain and deport someone. He said ICE’s workforce simply does not have the resources to deport all 11 million people.

ICE’s Feb. 18 guidelines provided more-specific directions to immigration agents to determine whom to arrest and deport. The guidance effectively banned the deportation of immigrants unless they were violent and gang members or aggravated felons.

But Mayorkas said in the new memo that the decision to detain someone should not be determined “according to bright lines or categories,” and instead should be decided based on the “totality of the facts and circumstances.”

Typically a serious criminal would be a priority for arrest and deportation, he wrote. But he said cases can become “complicated.”

Some people convicted of a crime but who do not pose a threat to public safety and have family in the United States could be allowed to stay, he said. Conversely, immigrants with no convictions but who are deemed dangerous might be detained and deported.

Advocates for immigrants have criticized the Biden administration for allowing detention levels to increase from about 15,000 people a day to nearly 24,000 people a day, after promising to limit detention. But Mayorkas said most detainees are recent border crossers, who remain a priority for deportation. He said the arrests of serious criminals in the U.S. interior has also risen.

Some advocates for immigrants praised the new ICE priorities, while others were skeptical that immigration agents would exercise restraint. “This memo falls far short of delivering what our communities need: bold and fundamental transformation, not changes around the edges to the same detention and deportation machinery,” said Sirine Shebaya, executive director of the National Lawyers Guild’s National Immigration Project, in a statement.

Hours later, advocates confronted a new disappointment: A D.C. appeals court panel ruled that DHS could continue expelling migrant families from the southwest border, lifting a lower court ruling that would have stopped that policy at midnight.

Apprehensions on the border are at their highest levels in 21 years, prompting the Biden administration to retain a Trump-era order known as “Title 42” authorizing them to expel migrants crossing illegally into the United States. DHS has said it is expelling most single adults and some migrant families, though many have been allowed into the country.

Mayorkas said in his memo Thursday that migrants who cross the border illegally, particularly those who arrived unlawfully over the past year or so, remain a “threat to border security” and a priority for removal. But the ACLU has argued in its lawsuit that migrants have a legal right to seek asylum.