As fewer unaccompanied children cross the southern border to enter the United States, officials say they no longer need to house them at military facilities.

The U.S. Department of Health and Human Services announced Monday that it will suspend operations at three temporary shelters for young illegal immigrants on military bases, beginning with Fort Sill in Oklahoma as early as Friday.

HHS officials said the two remaining facilities — Lackland Air Force Base in Texas and Naval Base Ventura County in California — should be phased out over a period of two to eight weeks.

The agency opened the shelters in May and June to house an influx of more than 57,000 unaccompanied minors who crossed the Rio Grande Valley since October, most from Central America.

So far, the military shelters have housed 7,700 children, but since Department of Homeland Security officials announced a slowing of the flow in July, HHS hopes to keep children in more permanent shelters run by nonprofit organizations that are cheaper to manage.

“We are able to take this step because we have proactively expanded capacity to care for children in standard shelters, which are significantly less costly facilities,” HHS spokesman Kenneth Wolfe said in a prepared statement. “At the same time, we have seen a decrease in the number of children crossing the southwest border.”

The decision to close the shelters comes after some Oklahoma officials openly criticized the use of Fort Sill, an Army facility refitted to shelter 1,200 children.

Lawmakers, including Rep. Jim Bridenstine, R-Okla., complained that housing children at military bases distracted from their mission.

“Military bases were not designed to be refugee camps,” Bridenstine told The Daily Signal in an exclusive interview July 24. “We need to get these facilities back so that we can have the troops do the training they need to do.”

Wolfe warned that the shelters at military bases could be reopened if the number of border-crossing children significantly increases.

“The Department of Defense has been an exemplary partner in this humanitarian response,” the HHS spokesman said.

Congress left Washington for a five-week recess late last week without agreeing to an emergency spending bill to address the border crisis.

The Department of Homeland Security will transfer $405 million from other programs to cover costs,  Reuters news agency reported Friday.

Obama administration officials had warned that without more funds, the Immigration and Customs Enforcement agency would run out of money to meet the crisis in mid-August and that U.S. Customs and Border Protection would be out of funding in mid-September.

The bulk of the transfer — about $270 million — will come from the Federal Emergency Management Agency’s disaster relief fund, Reuters reported. An additional $30 million will come from the Coast Guard.

The transfer, known as “reprogramming,” can be carried out without legislation, according to the report.

The Republican-controlled House of Representatives on Friday night approved legislation to provide $694 million in new funds, mostly for border security. That bill has little chance of becoming law, however, because the Democrat-controlled Senate — which left town the day before — has indicated it won’t pass it.

President Obama, who asked Congress for $3.7 billion to address  the border crisis, called the House’s measure “extreme” and “unworkable.”