The removal of top officials at the Department of Homeland Security came after months of clashes involving Stephen Miller, the White House adviser and architect of Mr. Trump’s immigration agenda. Mr. Miller and others have pressed for implementing policies that current and former officials have called legally questionable, impractical, unethical or unreasonable.

Another angle: In addition to what he has said are the dangers of immigration, Mr. Trump has played on fears of Muslims. He is likely to resurrect that theme during his re-election campaign and has apparently picked a specific target: Representative Ilhan Omar, a Minnesota Democrat who is one of the first Muslim women elected to Congress.

Looking ahead: A redacted version of the special counsel’s report is expected to be released this week. Mr. Trump’s plan, aides say, is to act as if the report itself is extraneous to the attorney general’s summary, which the president has said exonerated him.