On his return, Mr. Pence lashed out at what he called “dishonest” coverage of his trip. But Democrats are charging that Mr. Pence staged a photo-op to give a misleading impression of the fate of the migrant children.

Inspiring anger and debate that still reverberate days later, Mr. Pence’s trip illustrates the challenge of the Trump administration’s dual, and at times contradictory, messages about detained migrants. On one hand, administration officials largely concede that adult detainees experience grueling conditions in federal custody, which affirms Mr. Trump’s call for drastic measures to harden the border and provides a deterrent for would-be border crossers. On the other, Mr. Pence and other top officials are clearly sensitive to the mounting evidence that migrant children are suffering in federal custody and are trying to reassure the public about their treatment.

“We spoke to cheerful children who were watching television, having snacks,” Mr. Pence said. “They told us that they were being well taken care of.”

But much of the news media and political response to the trip focused not on the children Mr. Pence had met but on the hundreds of men enduring prison-like conditions. That prompted Mr. Pence’s indignant Twitter posts on Friday about CNN, which he said “only played video of the men in the temporary facility and didn’t play any footage of the family facility at all.” He also complained that the network was “ignoring the excellent care being provided to families and children.” Then on Sunday, Trump administration officials parried stinging questions from Sunday talk show hosts who pressed them on what one of them, Chris Wallace of Fox News, called the “disaster” Mr. Pence had witnessed.

Democrats charged on Monday that Mr. Pence offered the public a misleading impression about the treatment of detained children during a visit to a separate facility in Donna, Tex., housing families with children. During a brief supervised exchange with the vice president, with a Spanish-language cartoon playing in the background, some young children told Mr. Pence they were treated well as they waited with their families for processing by immigration officials.