He has moved to cut off all foreign aid to countries like Guatemala, Honduras and El Salvador, and threatened to completely seal off the border with Mexico, a move that numerous officials told him would violate American law and international treaties.
He later retreated from that threat by giving Mexico a “one-year warning” instead and threatening heavy auto tariffs on cars coming into the United States from Mexico. Mr. Trump also shifted hundreds of Customs and Border Protection agents from inspecting goods flowing into the United States to policing the southwestern border, a move that has disrupted trade by producing long wait times at border crossings.
His growing frustration at his administration’s handling of immigration issues this year led to a purge of top officials at the Department of Homeland Security, including the secretary, Kirstjen M. Nielsen. But he has continued to tell aides privately, and tweet publicly, that he believes Mexico could do more to prevent the problem at his doorstep.
But while Mr. Trump has made cracking down on illegal immigration a priority, his announcement on Thursday could derail another of his chief goals: Revising the North American Free Trade Agreement.
The announcement came the same day that his administration told Congress it planned to seek congressional approval of a new trade pact with Mexico and Canada, known as the United States-Mexico-Canada Agreement, which would preserve the ultralow tariffs the original deal put into place. To hasten approval of the deal in all three countries, Mr. Trump recently agreed to lift tariffs the United States had placed on steel and aluminum imports from Canada and Mexico. Those countries, in turn, agreed to lift punishing tariffs on American goods, including farm products like pork, whiskey, apples and cheese.
Administration officials on Thursday portrayed the president’s move as a matter of national security, suggesting it would take priority over other goals.
“The situation is both a humanitarian and a border security crisis that has become a national emergency,” Kevin McAleenan, the acting secretary of homeland security, said in a conference call with reporters after the announcement, echoing the messaging that Mr. Trump has used relentlessly for the past several months.