WASHINGTON — President Trump’s closing argument is now clear: Build tent cities for migrants. End birthright citizenship. Fear the caravan. Send active-duty troops to the border. Refuse asylum.

Immigration has been the animating issue of the Trump presidency, and now — with the possibility that Republicans could face significant losses in the midterm elections on Tuesday — the president has fully embraced a dark, anti-immigrant message in the hope that stoking fear will motivate voters to reject Democrats.

In a rambling speech on Thursday afternoon that was riddled with falsehoods and vague promises to confront a “crisis” at the border, Mr. Trump used the official backdrop of the White House to step up his efforts to demonize a caravan of Central Americans that has been making its way through Mexico, assail Democrats, and promote a vision of a United States that would be better off with fewer immigrants.

The president said he had ordered troops to respond to any migrants in the caravan who throw rocks as if they were brandishing firearms, saying, “I told them: Consider it a rifle.” He said his government had already begun to construct “massive cities of tents” to imprison legal and illegal immigrants who try to enter the United States.