A short time later, he wrote on Twitter, “The Democrats are forcing the breakup of families at the Border with their horrible and cruel legislative agenda.”

But Mr. Trump was misrepresenting his own policy. There is no law that says children must be taken from their parents if they cross the border unlawfully, and previous administrations have made exceptions for those traveling with minor children when prosecuting immigrants for illegal entry. A “zero tolerance” policy created by the president in April and put into effect last month by the attorney general, Jeff Sessions, allows no such exceptions, Mr. Trump’s advisers say.

The president’s efforts to deflect blame for the practice reflected the degree to which it has become politically unpopular, with Democrats, civil rights and immigrant advocacy groups and religious leaders condemning it as inhumane. Republicans have also begun to express unease about the practice. Speaker Paul D. Ryan, Republican of Wisconsin, said on Thursday that he was not comfortable with it, and Gov. John Kasich of Ohio tweeted on Friday: “Quit separating families. It’s that simple.”

The number released on Friday suggests that thousands of children have been taken from their parents at the border since late last year. The New York Times reported in April that about 700 children had been separated from their parents as they were processed at stations on the southwest border, including more than 100 under the age of 4. As the number of children in its custody grows beyond the capacity of existing detention centers, the Trump administration reportedly plans to erect a tent city in Tornillo, Tex., to house them.

The homeland security official said that the administration had drawn a “bright line” against taking babies from their parents because the government was unable to appropriately care for children that young, but could not immediately provide information about the age cutoff below which they would decline to take a child.