WASHINGTON — President Trump and two members of his cabinet mounted an aggressive defense on Monday of his policy of separating children from their parents at the border in response to a growing outcry from members of both parties.

“They could be murderers and thieves and so much else,” Mr. Trump said of the people crossing the border. “We want a safe country, and it starts with the borders, and that’s the way it is.”

Attorney General Jeff Sessions also defended the practice, while insisting that “we do not want to separate parents from their children,” and later, at a tumultuous White House news briefing, Kirstjen Nielsen, the secretary of homeland security, gave a forceful explanation of the administration’s actions, arguing that it had no choice, and insisting that the only way the practice could end would be through congressional action.

Unlike Mr. Trump, she did not repeat the false accusation that only the Democrats, the minority party, were to blame for what she said was Congress’s failure to act to end a policy that, by some counts, has resulted in nearly 2,000 children taken away from their parents in a six-week period.