New York City Mayor Bill de Blasio's administration will remove 400 children from two city homeless shelters, officials told The New York Times. The plan is part of the mayor's attempt to check the city's overwhelming homeless population.

The children and their families will be removed from the Auburn Family Residence in Brooklyn, and the Catherine Street shelter in Manhattan, both of which are owned by the city. The children will be transferred to permanent housing or temporary housing at other locations.

Both shelters have been repeatedly sanctioned for horrible conditions over the past 10 years, The Times reported. Children at the shelters were surrounded by cockroaches and violence, eating rotten food and barely getting any heat.

"We just weren't going to allow this to happen on our watch," de Blasio said, according to The Times.

Inspectors have cited the Auburn shelter over 400 times for unsafe conditions including exposure to lead, mold and vermin, as well as taking in sexual predators, The Times reported.

One mother, Dawn Hazel, lived at the Catherine Street shelter for a year. Hazel, who has five children, told The Times several people at the shelter once accosted her youngest son in the bathroom and exposed themselves to him.

"This is no place for kids," Hazel, 38, told The Times.  

There are 22,000 homeless children in the city, a number that continues to rise. The Office of Temporary Disability Assistance, in charge of funding the homeless shelters, has demanded that children be removed from the Catherine Street shelter, The Times reported.  

However, the office never withheld money from the shelters to ensure the children were removed, claiming that it would deprive the city's record high homeless population.

When the children are removed the two shelters are to be turned into facilities for adult families, which will cost $13 million.

De Blasio said the solution to helping the homeless is providing people with the means to afford a home.

"Greater supply of affordable housing. Pushing up wages and benefits. More preventative efforts," de Blasio said, according to The Times.