IN A brief appearance Wednesday at the Department of Homeland Security, President Trump went out of his way to paint illegal immigrants as dangerous predators, making no distinction between the relative few who have committed serious crimes and the vast majority of an estimated 11 million who have led peaceful and productive lives in this country, in most cases for more than 15 years. Intoning the names of family members whose loved ones were killed by undocumented immigrants, he asserted their plight had been ignored, and ordered that an office be established at DHS to help the victims of such crimes, thereby adding social services to the department’s core security mission.

By that act of political theater, and by hailing the leaders of two DHS unions that endorsed him, the new president managed to politicize public safety, even as he declared that “when it comes to public safety, there is no place for politics.”

Mr. Trump also made clear he is willing to throw billions of dollars at a problem that has mostly been fixed, paying for ostensible solutions that won’t do much good: construction of a wall and the hiring of 5,000 new Border Patrol officers, as well as many additional Immigration and Customs Enforcement officials.

In fact, the nation’s southern border is already well staffed with Border Patrol agents, whose numbers have more than doubled, under Presidents George W. Bush and Barack Obama, since the Sept. 11 attacks. The number of illegal crossings is near a 40-year low. If the goal is really to make the border even more secure, better technology would be the way to go. If Congress goes along, a lot of money will be wasted, given cost estimates for the wall alone well in excess of $10 billion — but it won’t be the first time the U.S. government has managed to misspend vast sums.

Far more damaging, to American principles and the nation’s standing in the world, would be actions outlined in a draft executive order, apparently awaiting Mr. Trump’s signature, that would drastically curtail the United States’ commitment to accept refugees from Muslim-majority countries in the Mideast, especially Syria, most of whom are fleeing terrorism. Such refugees should be subject to extensive background checks and other vetting before being granted U.S. visas — as they already are. But a blanket ban would compromise this nation’s long-standing position as a sanctuary for desperate and innocent people. As a backdoor way for Mr. Trump to partially make good on his proposed Muslim ban, it also would be an affront to this country’s status as an example of religious tolerance.