Defense Secretary Jim Mattis weighed in on the controversial decision to separate immigrant children from their parents, saying the military would provide housing at bases if asked.

In recent weeks, Congress and President Donald Trump have faced a groundswell of criticism for the administration’s decision to separate immigrant children from parents along the southern U.S. border with Mexico who have crossed into the country illegally. Images and sound recordings of traumatized children, some as young as 2 years old, have become a lightning rod for the divisive issue. Trump signed an executive order Wednesday to end the practice.

The order, according to a White House email sent to reporters Wednesday, calls for Mattis to “take all legally available measures to provide to the [DHS Secretary,] upon request, any existing facilities available for the housing and care of alien families, and shall construct such facilities if necessary and consistent with law. The Secretary, to the extent permitted by law, shall be responsible for reimbursement for the use of these facilities.”

Mattis addressed the issue while waiting outside the Pentagon for German Defense Minister Ursula von der Leyen, who was visiting Washington in advance of next month’s NATO summit.

“We support DHS,” Mattis told reporters. “We’ll respond if requested.”

Pressed further on the optics of having kids kept on secure military bases, Mattis was quick to provide context: “We have housed refugees, we have housed people thrown out of their homes by earthquakes and hurricanes. We do whatever is in the best interest of the country.”

The children would be housed on military bases in Texas and Arkansas, although the Department of Health and Human Services would have the lead in caring for them. The bases include Fort Bliss, Goodfellow Air Force Base and Dyess Air Force Base in Texas, and Little Rock Air Force Base in Arkansas.

More than 2,000 children, some traveling alone and others with their parents, have crossed into the U.S. over the last few months from Mexico and various South American nations.

It’s not the first time the bases have been used in this capacity.

In 2014 Lackland Air Force Base was used to detain immigrant children, and at the time, HHS installed a fence to separate the children from the rest of the base, a defense official said.

In addition, a complex with an 1,800-bed capacity was used in 2016 at Fort Bliss to house unaccompanied minors who immigrated to the U.S. And about 700 immigrant children stayed at Holloman Air Force Base in New Mexico that same year. The minors spent about a month at the facilities.