WASHINGTON — For weeks before the midterm elections, President Trump warned ominously about the threat from a caravan of migrants streaming from Central America toward Mexico’s border with the United States. It was a fearsome mix of criminals and “unknown Middle Easterners,” Mr. Trump claimed darkly, one that constituted a genuine national emergency.

But since the election last week, Mr. Trump has tweeted about the caravan exactly once — to issue a proclamation preventing those who cross the border illegally from applying for asylum in the United States. Fox News, which faithfully amplified Mr. Trump’s warnings about the migrants, has gone similarly quiet on the subject.

There was little dispute, even before Election Day, that Mr. Trump was exploiting the caravan for political purposes. But analysts, historians and veterans of previous administrations said there were few comparable instances of a commander in chief warning about what he called a looming threat, only to drop it as soon as people voted.

While the caravan has faded from television screens, the costs of Mr. Trump’s response to it have not. Nearly 6,000 active-duty troops remain deployed from the Gulf Coast to Southern California, where they are putting up tents and stringing concertina wire to face a ragtag band that is still not near the border.