McALLEN, Texas — Far fewer unaccompanied immigrant children are crossing the Texas-Mexico border, allowing the federal government to close the temporary shelters that it hurriedly opened to handle the surge, authorities say.

The Department of Homeland Security released data Thursday showing that about 5,500 unaccompanied children were arrested in July, barely half the number in May and June and the fewest children arrested in a month since February. Similarly, arrests of parents with children dropped by more than half last month, to just over 7,400.

DHS Secretary Jeh Johnson welcomed the decline but said the current numbers are still much higher than in previous years.

“We continue to have much work to do to address this issue, and our message continues to be clear – ‘Our border is not open to illegal migration,’ ” Johnson said in a statement.

Arrests in South Texas have fallen in recent weeks to about 100 per day, down from 300 or more in June, according to the Border Patrol. The decline could be the result of searing summer temperatures or a messaging campaign that stresses the dangers of the journey and warns them they will not be allowed to stay.