The U.S. will allow transgender immigrants in the country illegally to be housed in detention centers correlating with their gender identity, a move that comes in light of several recent reports finding dozens of instances of physical and sexual abuse among transgender detainees. Immigration officials announced the policy Monday and said officers would be trained to respectfully ask detainees about their gender, according to Fusion.

The issue has been a topic among lesbian, gay, bisexual or transgender activist groups for years, as transgender migrants have often faced harassment when held in all-male facilities. U.S. Immigration and Customs Enforcement, or ICE, has instated policies aimed at keeping transgender detainees safe before, but said the latest move would offer further protections. “We believe this guidance is the most comprehensive for transgender individuals in any custodial entity,” deputy assistant director for ICE’s custody programs Andrew Lorenzen-Strait told Fusion.

One in 500 people detained in immigration facilities is transgender, according to the Washington Post. Many of them come from Central and South American countries and seek asylum in the U.S. because of the discrimination they’ve faced in their home countries.

However, often conditions in detention centers are just as harsh as those they’ve left behind. One-fifth of all substantial sexual abuse and assault cases in ICE facilities between 2009 and 2013 involved transgender detainees, according to a 2013 report by the Government Accountability Office. One case involved a male guard who coerced a transgender detainee into showing him her breasts while the guard inappropriately touched himself, the report found. Some facilities have special housing for LGBT detainees, but such individuals often come in contact with people from other parts of the facility or face harassment from prison staff.

In 2007, a 27-year-old transgender woman named Victoria Arellano, who was from Mexico but was arrested in the U.S. on a traffic violation, died in a California detention center after the facility ignored her need for treatment for her HIV infection, according to the Atlantic