WASHINGTON — The number of unaccompanied migrant children in Border Patrol custody has dropped from 2,350 on May 30 to under 300 as of Tuesday, according to an internal Department of Homeland Security document obtained by NBC News.

The overcrowding led to poor conditions for children at border stations, which was recently cataloged by DHS internal watchdog reports from stations in the El Paso and Rio Grande Valley sectors in Texas.

The drop is in large part due to the overall decline in undocumented immigrants crossing the border in June compared to May. Acting DHS Secretary Kevin McAleenan said on Friday his agency estimated a 25 percent drop in crossings from June compared to May.

The total number of border crossings generally drops each year in summer months as the temperature rises.

Also, Health and Human Services, the agency responsible for longer-term care of children as they wait to be paired with a sponsor or relative, has expanded its capacity.

The Inspector General reports included details of migrants being packed into cells maxed out at five times their capacity and not having regular access to showers. Those reports were based on visits by investigators to El Paso stations in early May and Rio Grande Valley stations in early June.