WASHINGTON (Reuters) - The United States said on Monday it will send over 5,200 troops to help secure the border with Mexico, a far larger-than-expected deployment as President Donald Trump hardens his stance on immigration ahead of Nov. 6 mid-term elections.

The deployment will create an active-duty force comparable in size to the U.S. military contingent in Iraq, as Trump’s administration draws attention to a caravan of migrants that is trekking through Mexico toward the United States.

General Terrence O’Shaughnessy, the head of U.S. Northern Command, said 800 U.S. troops were already en route to the Texas border and more were headed to the borders in California and Arizona.

“The president has made it clear that border security is national security,” O’Shaughnessy said, as he detailed a much larger deployment that the 800 to 1,000 troops predicted by U.S. officials last week.

O’Shaughnessy said some soldiers would be armed although it was unclear who, beyond U.S. military police, might need those weapons. U.S. officials have stressed that the troops would not police the border and instead carry out support roles like building tents and barricades, and flying U.S. customs personnel to locations along the border.

Trump railed against illegal immigration to win the 2016 U.S. presidential election and has seized on the caravan of Central American migrants at campaign rallies in the run-up to next week’s vote, firing up support for his Republican Party.

Trump said the United States would build “tent cities” to house migrants seeking asylum, rather than releasing them while they await court decisions.

“We’re going to put tents up all over the place. We’re not going to build structures and spend all of this, you know, hundreds of millions of dollars - we’re going to have tents,” he told Fox News in an interview.

Trump said detaining asylum seekers while their cases are being decided would discourage others from following suit.

Slideshow ( 10 images )

ARMED SOLDIERS

If the Republicans lose control of the House of Representatives or the Senate, it could become much harder for Trump to pursue his policy agenda in his remaining two years in office.

According to a Pew Research Center survey conducted in late September and early October, 75 percent of Republican voters said illegal immigration is a very big problem, compared with 19 percent of Democratic voters.

Although Trump’s supporters in Congress praised the deployment of troops, the American Civil Liberties Union derided it as a political stunt.

“President Trump has chosen just before midterm elections to force the military into furthering his anti-immigrant agenda of fear and division,” said Shaw Drake, policy counsel for the American Civil Liberties Union Border Rights Center in El Paso, Texas.

Trump said on Twitter on Monday that the military would be waiting for the procession -- suggesting a far more direct role in confronting the migrants than the Pentagon described.

“Many Gang Members and some very bad people are mixed into the Caravan heading to our Southern Border,” Trump tweeted.

“Please go back, you will not be admitted into the United States unless you go through the legal process. This is an invasion of our Country and our Military is waiting for you!” he added.

Slideshow ( 10 images )

Trump administration officials have been discussing other options to address the caravan and a surge in border crossings, including having Trump use his authority under the Immigration and Nationality Act to declare certain migrants ineligible for asylum for national security reasons.

Officials said no decisions had been made.

Kevin McAleenan, the U.S. commissioner of Customs and Border Protection, said a group of approximately 3,500 immigrants were traveling through southern Mexico with the intent of reaching the U.S. border. A second caravan of about 3,000 people were at the Guatemala-Mexico border, McAleenan said.

At the same time, over the last three weeks, border agents have encountered nearly 1,900 people per day either crossing the border illegally or presenting themselves at ports of entry, with over half of them being children alone or parents and children traveling together, McAleenan said.

“We are already facing a border security and humanitarian crisis at our southwest border,” he said.

Some migrants have abandoned the journey, deterred by the hardships or the possibility instead of making a new life in Mexico. Others joined it in southern Mexico.

Trump’s decision to call in the military appears to be a departure from past practice, at least in recent years, in which such operations were carried out by National Guard forces -- largely part-time military members who are often called upon to serve in response to domestic emergencies.

There are already 2,100 U.S. National Guard forces at the border, sent after a previous Trump request in April. The latest deployment would be in addition to those forces.

The decision to send active duty forces this time gives the Pentagon the ability to more rapidly mobilize greater capability than would be immediately available with the Guard, officials told Reuters.

But it also injects the military, which prides itself in being non-partisan, into a highly charged political issue just days ahead of an election.