WASHINGTON — The government said Monday that it will soon close three emergency shelters it established at U.S. military bases to temporarily house children caught crossing the Mexican border alone. It said fewer children are being caught and other shelters will be adequate.

A shelter in Oklahoma at Fort Sill is expected to close as early as Friday, said the Health and Human Services Department. Shelters in Texas, at Joint Base San Antonio-Lackland, and in California, at Naval Base Ventura County-Port Hueneme, will wrap up operations in the next two to eight weeks, said the department’s spokesman, Kenneth Wolf.

About 7,700 children had been housed at the three military bases since shelters they opened in May and early June. The children stayed an average of 35 days.

Since Oct. 1 more than 57,000 unaccompanied children, mostly from Honduras, El Salvador and Guatemala, have been caught crossing the Mexican border illegally.

A 2008 law requires that unaccompanied children from countries that don’t border the United States be handed over to the Health and Human Services Department within 72 hours of being apprehended. The children are cared for by the government until they can be reunited with a relative or another sponsor in the United States while they await a deportation hearing.

The crush of Central American children caught at the border in recent months has strained resources across the government and prompted President Obama to ask Congress to approve an emergency $3.7 billion spending bill to deal with what he described as a humanitarian crisis. Just before leaving town for the August recess, the House approved two bills that would provide the administration with $694 million and end a program that protects some young immigrants from deportation for as long as two years.

Obama objected, saying Republican lawmakers of “not even trying to solve the problem.”

The Senate had blocked its version of the border bill, leaving the problem unresolved before Congress left Washington for its five-week summer recess.

Last month, the Homeland Security Department reported that the number of children crossing the border alone had started to decline, from as many as 2,000 each week in June to about 500 each week in mid-July. Administration officials said at the time that multiple factors likely contributed to the decline.

The number of people caught crossing the border illegally typically declines during the hottest summer months.

Administration officials have said that as many 90,000 child immigrants could cross the border by the end of the budget year Sept. 30.

The military base shelters could reopen if the number of young border crossers spikes again in the near future, Wolfe said.