President Trump threatened to order the U.S. military to "close" the southern border with Mexico, issuing a salvo of morning tweets that blasted Democrats, Mexico and other Latin American countries over immigration policy. The president made the comments as a caravan of Central American migrants is trying to reach the United States.

Mr. Trump said leaders in Guatemala, Honduras and El Salvador are doing little to stop the large flow of people into the U.S. "In addition to stopping all payments to these countries, which seem to have almost no control over their population, I must, in the strongest of terms, ask Mexico to stop this onslaught - and if unable to do so I will call up the U.S. Military and CLOSE OUR SOUTHERN BORDER,'' he wrote in his tweet.

I am watching the Democrat Party led (because they want Open Borders and existing weak laws) assault on our country by Guatemala, Honduras and El Salvador, whose leaders are doing little to stop this large flow of people, INCLUDING MANY CRIMINALS, from entering Mexico to U.S..... — Donald J. Trump (@realDonaldTrump) October 18, 2018

....In addition to stopping all payments to these countries, which seem to have almost no control over their population, I must, in the strongest of terms, ask Mexico to stop this onslaught - and if unable to do so I will call up the U.S. Military and CLOSE OUR SOUTHERN BORDER!.. — Donald J. Trump (@realDonaldTrump) October 18, 2018

....The assault on our country at our Southern Border, including the Criminal elements and DRUGS pouring in, is far more important to me, as President, than Trade or the USMCA. Hopefully Mexico will stop this onslaught at their Northern Border. All Democrats fault for weak laws! — Donald J. Trump (@realDonaldTrump) October 18, 2018

The president's comments come 19 days before the midterm elections, and he is rallying his base over his central campaign issue of hardening U.S. immigration policy. The president has said repeatedly that he thinks immigration should be a top issue on the campaign trail, as Republicans are fighting hard for control of the House and Senate.

Get Breaking News Delivered to Your Inbox

Earlier this week, the Trump administration said 66 children, including one under 5 years old, remain in custody and separated from their families as part of its immigration policy. Parents of 50 of the children have already been deported, according to the administration's numbers.

The zero-tolerance immigration policy which resulted in family separations became a source of controversy this summer. The president shifted his position on the policy at times, saying both that he opposed family separations but also defending the move as a deterrent to undocumented immigration.

Mr. Trump defended the policy in an interview with 60 Minutes on Sunday. "When you allow the parents to stay together, OK, when you allow that, then what happens is people are going to pour into our country," he said.

Congress hasn't allocated funding for President Trump's long-promised border wall yet, and the spending bill for the department that would fund such a wall, Homeland Security, has not been completed. There's likely to be a showdown over the funding for the border wall after the midterm elections.