Yet for George W. Bush and Barack Obama, the idea of crying children torn from their parents’ arms was simply too inhumane — and too politically perilous — to embrace as policy, and Mr. Trump, though he had made an immigration crackdown one of the central issues of his campaign, succumbed to the same reality, publicly dropping the idea after Mr. Kelly’s comments touched off a swift backlash.

But advocates inside the administration, most prominently Stephen Miller, Mr. Trump’s senior policy adviser, never gave up on the idea. Last month, facing a sharp uptick in illegal border crossings, Mr. Trump ordered a new effort to criminally prosecute anyone who crossed the border unlawfully — with few exceptions for parents traveling with their minor children.

And now Mr. Trump faces the consequences. With thousands of children detained in makeshift shelters, his spokesmen this past week had to deny accusations that the administration was acting like Nazis. Even evangelical supporters like Franklin Graham said its policy was “disgraceful.”