Two dozen immigrants have died in the custody of Immigration and Customs Enforcement since President Donald Trump’s inauguration, according to a new NBC News analysis of federal data.

That figure doesn’t include the deaths of at least four immigrants who died shortly after being released from ICE custody. It also doesn’t include the deaths of immigrants held by other federal agencies, including at least five migrant children who have died while in the custody of Customs and Border Protection or the Office of Refugee Resettlement, a division of the Department of Health and Human Services charged with caring for unaccompanied migrant children who enter the U.S.

Advocacy groups that work with migrants attribute the death toll to substandard conditions in more than 200 detention centers across the country. “What we're seeing is a reckless and unprecedented expansion of a system that is punitive, harmful and costly,” Katharina Obser, a senior policy adviser at the Women’s Refugee Commission, told NBC. “The U.S. government is not even doing the bare minimum to ensure [immigrants] are getting the medical care and the mental health care they need.”

An ICE spokesperson told NBC News that in-custody deaths are “exceedingly rare,” adding that ICE “takes very seriously the health, safety and welfare of those in our care, including those who come into ICE custody with prior medical conditions or who have never before received appropriate medical care.”

The spokesperson said ICE spends more than $269 million each year to provide “comprehensive medical care” to the 300,000 to 500,000 people in its custody.

But NBC’s report suggests that in many cases, immigrants in ICE custody — including those who are apprehended at the border while attempting to enter the country and those who are arrested while living in the U.S. — are often given substandard medical care.

The New York Times reported on Sunday that doctors who work with immigrants in ICE custody say they’re treated like “felons” despite being civil — not criminal — detainees. The physicians who spoke to the Times said punitive treatment can make it more difficult to treat detained immigrants, and that guards are often eager to get detainees out of the hospital and back to crowded, dangerous detention centers.

A report released last Thursday by the inspector general of the Department of Homeland Security, which oversees ICE, found “egregious violations” at four detention centers in 2018, including expired food and unsanitary bathrooms. A September 2018 report found nooses in detainee cells and misuses of solitary confinement at the Adelanto Detention Center in California, which is owned and operated by the GEO Group, a private prison company that contracts with the federal government and operates a network of ICE detention centers across the country.

“Dangerous” conditions in ICE detention, as the DHS OIG report called them, aren’t limited to the Trump administration. The number of in-custody deaths peaked in 2004, when 32 immigrants died while detained by ICE. The annual death toll varied during the Obama administration: there were 10 ICE deaths in 2008, five in 2012, and 12 in 2016, NBC previously reported.

Immigration advocates say conditions will continue to get worse as the Trump administration detains more immigrants, which will lead to overcrowding and exacerbate the dangers of detention.

Approximately 34,000 immigrants were detained each day during the Obama administration. As of this month, ICE detains more than 52,500 immigrants each day — a figure that is expected to grow as the Trump administration cracks down on immigrants already living and working in the U.S.