U.S. officials jailed approximately 2,100 pregnant women for immigration violations in 2018, including hundreds who were held for weeks or longer, bringing the increase since President Trump took office to 52 percent, according to a Government Accountability Office report released Thursday.

The spike in pregnant detainees came after federal officials terminated an Obama administration order to release most expectant mothers because of health concerns.

Advocates for immigrants had pushed the Obama administration to sharply curtail the practice of detaining pregnant women ahead of the 2016 elections, citing insufficient health care and nutrition in federal detention centers and contract jails and the increased risk of miscarriage. But shortly after the policy went into effect, Trump declared that nobody in the United States illegally is immune to detention and deportation.

The increase in detained pregnant women comes amid myriad policy efforts to put pressure on migrants, with the ultimate goal of deterring people from making the trip to the U.S. southern border. The administration also has tried to restrict underage migrants’ access to abortion services, and advocates for immigrants say officials have expelled pregnant adults to dangerous cities in Mexico to await their asylum hearings.

Most pregnant women taken into custody last year had no prior criminal record, according to the report. Most were apprehended by U.S. Customs and Border Protection at or near the southern border, a sign that many were among the thousands of Central American families seeking asylum.

The GAO said the majority of pregnant detainees were held for 15 days or less.

But a breakdown shows that the Trump administration has held more pregnant women for longer periods than previous administrations. ICE detained 92 pregnant women for longer than 15 days in 2016, but last year officials held 615 pregnant women longer than that, some for several months.

Jim Crumpacker, the Homeland Security official who wrote an official government response included in the GAO report, said U.S. Immigration and Customs Enforcement prioritizes detaining and deporting migrants with criminal convictions, and that the agency treats pregnant women and other vulnerable groups with “respect and compassion.” He wrote that ICE considers whether to detain migrants on a case-by-case basis and has released “certain” immigrants, including pregnant women, on humanitarian grounds.

While past administrations have detained pregnant women, ICE issued a memo to its field offices in late 2016 saying pregnant women should “generally” be released from detention and that agents should pay attention to expectant mothers’ “particular needs and vulnerabilities.”

The number of pregnant detainees declined from 1,380 women in calendar year 2016 to 1,160 women in 2017.

But in December 2017, then-ICE acting director Thomas Homan — who enforced the policies under both administrations — issued a new directive that officials said “ended the presumption of release for all pregnant detainees.”

During the next year, the number of detained pregnant women rose to 2,098.

ICE officials said after the policy shift that they would not necessarily detain all pregnant women, just those whose detention was necessary to complete their immigration proceedings. Others could be held if they posed a flight risk or a danger to the community. All detainees receive health services, including prenatal testing and care, according to agency policy. ICE does not generally detain women who are in their third trimester of pregnancy.

An ICE official, speaking on condition of anonymity to discuss the detention figures, said Thursday that attempted border crossings have shifted from mostly men years ago to more women and families, a changing population that likely contributed to the rise in pregnant detainees.

Lawyers for pregnant women say it is unfair to force women to remain in jail, fighting nausea and other pregnancy symptoms, while pleading their asylum cases. Some women have fled domestic violence in Central America and others were raped on their journeys through Mexico to the U.S. border.

The Women’s Refugee Commission and other advocacy groups filed a complaint with the Department of Homeland Security’s Inspector General and the Civil Rights and Civil Liberties Office in 2017, citing inadequate medical care and reports of women who had suffered infections, stress and in some instances, miscarriages in detention.

The GAO report, which examined ICE enforcement from 2015 through 2018, said arrests and deportations rose overall, including increases in the number of migrants who are elderly, transgender and disabled. Generally immigration officials do not target such populations in the interior of the United States unless they have a criminal history, officials said.

The number of transgender detainees increased from 237 in 2016 to 284 last year, with most having no criminal records. The majority were taken into custody at the border. About 1,150 elderly migrants were detained last year, up from about 750 in 2016, a 53 percent increase. Most had criminal records.

More than 8,000 detainees last year had mental disorders, which has remained fairly consistent for the past several years, and approximately half had criminal records. Detainees with disabilities rose from 434 in 2017, the earliest year in the report, to 530 migrants last year, a 22 percent increase. Nearly half had criminal records.