The Trump administration has rescinded an Obama-era policy that ordered immigration officials generally to release pregnant women from federal custody, U.S. officials said Thursday.

Immigrant organizations immediately blasted the policy change as an example of human rights abuses under President Trump, but it remained unclear how many more pregnant women might be jailed for deportation as a result.

Under the Obama administration, some pregnant women also were subject to mandatory detention if they had committed certain crimes or had arrived illegally and were subject to a fast-paced expulsion process called expedited removal.

U.S. Immigration and Customs Enforcement (ICE) said the new policy follows Trump’s executive order last year directing them to target anyone in the United States illegally. His order reversed President Barack Obama’s instructions to mainly detain and deport criminals and those who had recently crossed the border.

However officials cautioned that the new directive does not mean that all pregnant women will be detained. Cases will be handled on an individual basis, depending on the women’s flight risk, medical condition and whether they pose a danger to the public. Immigration officials also generally do not detain women in their third trimester.

“We’re ending the presumption of release for all pregnant detainees,” said Philip Miller, deputy executive associate director at ICE. “We’re no longer exempting any individual from being subject to the law.”

The policy took effect in December, and Miller said he did not know if it has led to an increase in pregnant detainees.

Since then, ICE has held 506 pregnant women in custody, but most are no longer detained. Miller said he did not know if they had been released or deported.

As of March 20, about 35 pregnant women were in custody, subject to mandatory detention under the law.

Advocates for immigrants swiftly rebuked the new policy, which comes months after the American Civil Liberties Union, the Women’s Refugee Commission and others filed a complaint with the Department of Homeland Security about the treatment of pregnant detainees. They said that ICE offered inadequate care and that the detention harmed women who had been raped or had high-risk pregnancies. Some miscarried.

The National Immigrant Justice Center, a nonprofit that advocates for immigrants’ rights, called the new policy “little more than blanket prolonged detention for all immigrants.”

“Again, ICE’s policymaking tells us all we need to know about the administration’s immigration-related goals — inflicting the maximum possible harm on already vulnerable individuals and communities, all in service of an explicitly anti-immigrant agenda,” Mary Meg McCarthy, the center’s executive director, said in a statement.

ICE officials said the agency provides prenatal care and education to pregnant detainees, as well as “remote access” to specialists. The agency also “ensures access to comprehensive counseling and assistance, postpartum follow-up, lactation services and abortion services.”

Adult ICE detainees will continue to have access to abortion services in federal custody, according to agency records.

Most pregnant women are detained after crossing the border illegally, Miller said, but some have committed crimes.

The new policy opens a new chapter in the president’s attempt to clamp down on illegal immigration, one of his signature issues on the campaign trail. Trump has aggressively peeled back Obama’s protections for undocumented immigrants.

He has phased out work permits for hundreds of thousands of undocumented immigrants, including Liberians this week. Immigration arrests are up more than 40 percent, and deportations surged 34 percent during Trump’s first nine months in office.