Frustrated by lawmakers who have prevented him from building a wall on the southern border, and by laws preventing him from deporting more migrants from the United States, Donald Trump has recently lashed out in anger at his subordinates and in rallies, fulminating over his inability to execute his sweeping campaign promises to keep more immigrants out of the country. “We have the worst immigration laws in the history of mankind,” the president said at a campaign-style rally in Elkhart, Indiana, on Thursday night. “Give me some reinforcements, please,” he urged the crowd, referring to Republicans in Congress who have balked at the billions of dollars he has requested for border security. During his first year in office, he had regularly extolled the continued decline in border crossings, which had fallen to the lowest level in decades. More recently, however, those numbers have climbed back toward the level they were in the final years of the Obama administration—an intolerable equivalence for Trump.

On Wednesday, during a Cabinet meeting, Trump exploded at his secretary of Homeland Security, Kirstjen Nielsen, a former Bush-era official, for failing to “close down” the border. For over 30 minutes, The Washington Post reports, Trump yelled at Nielsen, his face turning red. “Why don’t you have solutions? How is this still happening?” he said, questioned her intensely about the rise in border crossings. “We need to shut it down,” he demanded. “We’re closed.” People in the room grew uncomfortable as the awkward tirade continued.

Nielsen reportedly pushed back at points, and argued that she was constrained by American immigration laws—a position Attorney General Jeff Sessions supported. “She feels like she’s doing the best she can and doing a good job on immigration, but she also has to follow the law,” one source told the Post. “It’s frustrating to have your boss unhappy about that.”

The exchange was so hostile, according to The New York Times, that Nielsen later informed colleagues that she planned to leave the administration and drafted a resignation letter, though she did not submit it. A spokesperson for the Department of Homeland Security described the Times report as “false.” Nielsen herself did not deny that the meeting had been contentious or that she had nearly resigned. “The president is rightly frustrated that existing loopholes and the lack of congressional action have prevented this administration from fully securing the border and protecting the American people. I share his frustration,” Nielsen said in a statement.

While the president rages at the limits of his power, he has found other outlets to express his anti-immigration agenda. This week, the Justice Department announced that it would be prosecuting 100 percent of illegal border crossings—a decision that will involve separating more families, removing children from their parents when they are apprehended and detained. According to the Times, the president had viewed Nielsen and other D.H.S. officials as resistant to the family-separation policy, but the West Wing ultimately won out. Chief of Staff John Kelly defended the policy in an interview Thursday with NPR, explaining that the brutal “technique” was temporarily necessary to deter migrants who “don’t integrate well” into American society. “They don’t have skills,” Kelly argued. “They’re not bad people. They’re coming here for a reason, and I sympathize with the reason. But the laws are the laws.”

When Kelly was asked whether it is “cruel and heartless” to separate mothers and children, he seemed to shrug. “I wouldn't put it quite that way,” he said. “The children will be taken care of—put into foster care or whatever.”

Kelly’s concerns about “integration,” critics say, give away the game of Trump’s broader anti-immigrant vision. Over the last year, the president has been systematically ending Temporary Protected Status for immigrant groups who were granted amnesty in the United States following natural disasters or political upheaval in their own countries. In past administrations, this temporary status was regularly extended, allowing hundreds of thousands of people to become de facto Americans, with legal status, jobs, and families, if not full citizenship. Many of them have lived in the U.S. for more than a decade. Trump, however, has moved to remove these protections, effectively expelling as many as 300,000 people. In January, the president instructed the Department of Homeland Security to end the provisional status for 195,000 Salvadorans; in November, he ordered out about 46,000 Haitians, giving them only a few months to leave the country.

Last Friday, the Department of Homeland Security ended Temporary Protected Status for 57,000 Hondurans, too. Along with the some 700,000 Dreamers brought to the U.S. illegally as children, who Trump stripped of protection in September, about one million people who were once legal residents in the country face potential deportation.