A record number of unaccompanied immigrant children, about 14,000, were currently in US custody, according to a Health and Human Services (HHS) spokesman.

The spokesman, Mark Weber, said on Friday that the additional requirements put in place by President Donald Trump’s administration to “reduce risk and increase safety” for immigrant children contributed to the high number, CNN reported.

“We are taking all possible steps to protect children in an environment with many bad actors,” Weber said. “We are balancing speed with safety and will err on the side of safety.”

The administration had earlier heightened scrutiny of adults coming forward to take care of the immigrant children, and Immigrations and Customs Enforcement (ICE) now conducts exhaustive screenings of the adults.

But many of them were undocumented themselves and fearful of ICE obtaining their information.

These Trump administration policies were likely keeping these children in custody.

Lawsuits have also accused the administration of extending children’s stays, including allegedly holding them intentionally until they turn 18 and were eligible for stricter adult detention.

Many of the children do have a legal right to stay in the US, but the legal process can take years.

Weber said the high number was also due to the 50,000 Department of Homeland Security (DHS) referrals of unaccompanied children this year, which he said is the third-highest annual total, reports CNN.

Most of these children arrived in the US unaccompanied. Children separated under Trump’s so-called “zero tolerance” policy account for less than 200 of the reported 14,000.

In 2016, the monthly average of the number of children in HHS’s care ranged from 4,000 to over 9,000.