Unaccompanied immigrant children in government detention centers across the U.S. will no longer have English classes, recreational programs or legal aid, according to Department of Health and Human Services emails first obtained by The Washington Post.

The shelters will “begin scaling back or discontinuing” the funding for “activities that are not directly necessary for the protection of life and safety, including education services, legal services, and recreation” due to an influx of unaccompanied children crossing the border and a lack of funding, Evelyn Stauffer, a spokesperson for HHS’ Administration for Children and Families, told HuffPost.

The move could be illegal ― immigrant kids in custody must be taught English five days a week and have at least one hour of recreation time per day, under the terms of the 1997 Flores court settlement. But immigrant rights advocates fear the Trump administration is using child welfare rights as a political bargaining chip to secure funds from Congress. The administration has urged Congress to approve billions more in funding for the U.S.-Mexico border, including emergency funds that would increase shelter capacity and pay for part of President Donald Trump’s wall.

“It’s beyond the pale to threaten to take away the most basic protections [for children],” said Neha Desai, director of immigration at the National Center for Youth Law. “Once again this administration is using children as pawns for their broader political goals.”

And while the administration is blaming a border crisis and lack of government funds for these program cuts, immigrant rights experts said the government has itself to blame.

The number of unaccompanied immigrant children coming to the border and being placed in government custody reached a record high of 11,000 in May, and the number of kids in shelters has increased by 57% since last year, according to the Department of Health and Human Services.

There’s no doubt these numbers are stretching government resources, and HHS likely needs more funding to deal with this growing population. But immigrant youth advocates told HuffPost that the government has responded by enacting inhumane policies that exacerbate the system’s problems, such as family separation and sharing information with U.S. Immigration and Customs Enforcement.

“This is a management crisis,” said Michelle Brané, director of the Migrant Rights and Justice Program at the Women’s Refugee Commission. “These policies create chaotic and dangerous situations and harm children.”

Rather than tackling the root issues that are spurring immigrants to flee their home countries, the Trump administration has responded with draconian policies to deal with border apprehensions that do not work as deterrents, said Cory Smith, vice president of policy, advocacy and communications at Kids In Need of Defense, a group that provides legal representation to unaccompanied kids.

“I think there’s a lot of the policies that have manufactured a crisis and are self-inflicted wounds,” Smith said.

Desai said that if shelters maintained by HHS’ Office of Refugee Resettlement ran efficiently and released kids promptly ― as they are required to do by the Flores settlement ― it would free up money for the kinds of programs the department is now cutting. Instead, kids are spending an average of roughly 66 days in detention, according to an HHS official, which is close to double the average length of stay before Trump took office.

The amount of time children spend in detention began increasing last May after the government began separating families, sending 3,000 more kids into unaccompanied children’s shelters.

And though the zero tolerance policy ended last June, the government is still separating families on a smaller level, which is unnecessarily adding to the volume in detention centers. “A lot of children in ORR custody should not be there in the first place,” Brané said. “We have a disturbing numbers of family separations [still] occurring.”

Last May, the government further prolonged shelter stays by requiring that everyone in a sponsor’s household be fingerprinted before they could be released. The Trump administration has since rescinded this requirement, but it still shares sponsor information with ICE, which immigration advocates say has made undocumented sponsors afraid to come forward for fear of being arrested and deported.

In February 2018, HHS reopened a temporary unlicensed shelter in Homestead, Florida, to handle an influx of kids crossing the border, which costs more than $1.2 million a day. In a recent court filing, some children described being held in Homestead for more than six months due to major inefficiencies with the case management process, such as having their sponsors rejected without explanation and having their cases passed to multiple managers.

Smith said depriving children of legal aid could also keep them in shelters for longer, since they won’t have reminders of when to show up to their court dates, or guidance about how to navigate difficult decisions.

Peter Schey, one of the lead attorneys representing detained children as part of an ongoing lawsuit, has contacted the government about how nixing educational, recreational and legal programs violates child welfare standards. He said that if the policy is not promptly withdrawn, his team will ask a U.S. District Court to block its implementation.

“I think these policy changes are heartless and unnecessarily cruel,” he said. “They plainly violate both federal laws and the Flores settlement.”