Nearly 250 children were transferred out of Border Patrol facility in Clint on Monday

The acting commissioner of the US Customs and Border Protection agency announced his resignation on Tuesday amid a public outcry over alarming detention conditions of migrant children in Texas.

John Sanders, appointed to the post just two months ago, said in a letter obtained by several US media outlets that he planned to step down as acting CBP chief on July 5.

Sanders' departure coincides with the revelation of unsanitary detention conditions for children at an overcrowded Border Patrol facility in Clint, Texas, a sign of the increasing strain on resources due to soaring numbers of arrests at the US-Mexico border.

The conditions at the center in Clint were described by a team of lawyers, doctors and others who visited the facility about 20 miles (30 kilometers) southeast of El Paso.

Nearly 250 children were transferred out of Clint on Monday but a CBP official said Tuesday that some 100 were being sent back there.

"The three-year old before me had matted hair, a hacking cough, muddy pants, and eyes that fluttered closed with fatigue," wrote Clara Long, a researcher with Human Rights Watch who accompanied the team.

"His only caretaker for the last three weeks in a United States Border Patrol chain-link cage and then a cell... his 11-year old brother," Long said.

"Children at Clint told us they don't have regular access to showers or clean clothes, with some saying they hadn't been allowed to bathe over periods of weeks and don't have regular access to soap," she said.

Speaking on CNN on Tuesday, Long said "the situation is dire."

"And it's not just Clint," she said.

'Untenable position'

Sanders has led CBP since April, when President Donald Trump tapped CBP chief Kevin McAleenan to replace Kirstjen Nielsen as secretary of the Department of Homeland Security.

In a message to staff, Sanders did not give a specific reason for quitting and officials told The Washington Post and The New York Times it was not clear if his resignation was directly related to the handling of underage migrants at the border.

Trump told reporters Tuesday he did not ask Sanders to step down but "knew there were going to be changes there."

US law requires unaccompanied minors to be returned to their parents or transferred to Health and Human Services facilities within 72 hours.

But many of the children held by the Border Patrol in Clint had been there for three or four weeks, according to the team which visited the facility on June 17.

"The Border Patrol claims that high numbers of border arrivals are causing these delays as they wait for space to open up in the somewhat more child-friendly detention centers and shelters," said HRW's Long.

Arrivals of undocumented migrants at the southern US border have surged in recent months, with 144,000 people taken into custody in May alone. CBP deputy commissioner Robert Perez said more than 100,000 were children and families.

"Everybody understands it is not the Border Patrol's job to take care of children," said Warren Binford, a Willamette University law professor who visited the Clint facility.

"They are as upset as we are that these children are being put into their care because they don't have the ability to care for them," Binford said on MSNBC.

"These children need to be with their families."

'Form of slavery'

Perez, the CBP deputy commissioner, made the same complaint recently at a panel discussion in Washington.

"We are a border security agency now being called upon to deal with things we're not designed for," Perez said.

Trump, asked about conditions at the detention centers, said he was "very concerned" and urged Democrats to approve $4.5 billion in emergency humanitarian funding for the southwest border.

He said "bad people" were using children to take advantage of lax US immigration laws. "It's a form of slavery what they're doing to young children," he said.

Trump also said Mexico "for the first time in 50 years is helping us" prevent border-crossing.

"So I just want to thank Mexico," said the US leader, who had threatened steep tariffs on Mexican goods unless the government did more to slow migration.

After a week of tense negotiations, Mexico agreed to reinforce its southern border with 6,000 National Guardsmen and expand its policy of taking back migrants while the US processes their asylum claims. Mexico has also deployed 15,000 troops to the US border.

"They've done a great job," said Trump. "Hopefully they can keep it up."