John Sanders, the acting commissioner of Customs and Border Protection, announced in an internal email Tuesday that he had handed in his resignation letter — effective July 5 — to acting Secretary of Homeland Security Kevin McAleenan on Monday.

Why it matters: Sanders' resignation as the administration's top border enforcer follows heightened scrutiny over the past week of the conditions at migrant children's detention centers at the southern border.

The latest: Tuesday's reshuffle continued as 2 DHS officials told the Washington Post that Trump intends to name Mark Morgan — the acting director of U.S. Immigration and Customs Enforcement — as Sanders' replacement.

Context: News broke Monday that the U.S. government had removed most children from a Border Patrol station in Clint, Texas, following reports that more than 300 children detained there were exposed to dangerous and unsanitary living conditions.

On Tuesday, however, administration officials said that more than 100 children had been returned to the facility after concerns about overcrowding had been alleviated, the New York Times reports. It's unclear whether Sanders' departure is connected to the recent controversy.

Sanders assumed the role as the head of CBP after McAleenan moved into the role of acting DHS Secretary following Kirstjen Nielsen's departure.

In his resignation letter to McAleenan, Sanders said he "quoted a wise man" who told him: "'Each man will judge their success by their own metrics.' Although I will leave it to you to determine whether I was successful, I can unequivocally say that helping support the amazing men and women of CBP has been the most fulfilling and satisfying opportunity of my career."

Go deeper: Texas Republican says conditions in immigrant centers are worst he's ever seen