WASHINGTON -- The Pentagon said it's sending 5,200 troops to the Southwest border in an extraordinary military operation ordered up just a week before midterm elections in which U.S. President Donald Trump has put a sharp focus on Central American migrants moving north in slow-moving caravans that are still hundreds of miles from the U.S.

The number of troops being deployed is more than double the 2,000 who are in Syria fighting the Islamic State group.

Trump, eager to keep voters focused on illegal immigration in the lead-up to the elections, stepped up his dire warnings about the caravans, tweeting, "This is an invasion of our Country and our Military is waiting for you!"

But any migrants who complete the long trek to the southern U.S. border already face major hurdles -- both physical and bureaucratic -- to being allowed into the United States.

In an interview Monday, Trump said the U.S. would build "tent cities" for asylum seekers.

"We're going to put tents up all over the place," told Fox News Channel's Laura Ingraham. "They're going to be very nice and they're going to wait and if they don't get asylum, they get out."

Under current protocol, migrants who clear an initial screening are often released until their cases are decided in immigration court, which can take several years.

Trump denied his focus on the caravan is intended to help Republicans in next week's midterms, saying, "This has nothing to do with elections."

The Pentagon's "Operation Faithful Patriot" was described by the commander of U.S. Northern Command as an effort to help Customs and Border Protection "harden the southern border" by stiffening defences at and near legal entry points. Advanced helicopters will allow border protection agents to swoop down on migrants trying to cross illegally, said Air Force Gen. Terrence O'Shaughnessy.

Troops planned to bring heavy concertina wiring to unspool across open spaces between ports.

"We will not allow a large group to enter the U.S. in an unlawful and unsafe manner," said Kevin McAleenan, commissioner of Customs and Border Protection.

Eight hundred troops already are on their way to southern Texas, O'Shaughnessy said, and their numbers will top 5,200 by week's end. Some of the troops will be armed. He said troops would focus first on Texas, followed by Arizona and then California.

The troops will join the more than 2,000 National Guardsmen that Trump has already deployed to the border. It remained unclear Monday why the administration was choosing to send active-duty troops given that they will be limited to performing the same support functions the Guard already is doing.

The number of people in the first migrant caravan headed toward the U.S. has dwindled to about 4,000 from about 7,000 last week, though a second one was gaining steam and marked by violence. About 600 migrants in the second group tried to cross a bridge from Guatemala to Mexico en masse Monday. The riverbank standoff with Mexico police followed a more violent confrontation Sunday when the migrants used sticks and rocks against officers. One migrant was killed Sunday night by a head wound, but the cause was unclear.

The first group passed through the spot via the river -- wading or on rafts -- and was advancing through southern Mexico. That group appeared to begin as a collection of about 160 who decided to band together in Honduras for protection against the gangs who prey on migrants travelling alone and snowballed as the group moved north. They are mostly from Honduras, where it started, as well as El Salvador and Guatemala.

Another, smaller caravan earlier this year dwindled greatly as it passed through Mexico, with only about 200 making it to the California border.

Migrants are entitled under both U.S. and international law to apply for asylum. But there already is a bottleneck of would-be asylum seekers waiting at some U.S. border crossings to make their claims, some waiting as long as five weeks.

McAleenan said the aim of the operation was to deter migrants from crossing illegally, but he conceded his officers were overwhelmed by a surge of asylum seekers at border crossings. He also said Mexico was prepared to offer asylum to members of the caravan.

"If you're already seeking asylum, you've been given a generous offer," he said of Mexico. "We want to work with Mexico to manage that flow."

The White House is also weighing additional border security measures, including blocking those travelling in the caravan from seeking legal asylum and preventing them from entering the U.S.

The military operation drew quick criticism.

"Sending active military forces to our southern border is not only a huge waste of taxpayer money, but an unnecessary course of action that will further terrorize and militarize our border communities," said Shaw Drake of the American Civil Liberties Union's border rights centre at El Paso, Texas.

Military personnel are legally prohibited from engaging in immigration enforcement. The troops will include military police, combat engineers and others helping on the border.

The escalating rhetoric over the migrants and expected deployments come as the president has been trying to turn the caravans into a key election issue just days before elections that will determine whether Republicans maintain control of Congress.

"This will be the election of the caravans, the Kavanaughs, law and order, tax cuts, and you know what else? It's going to be the election of common sense," Trump said at a rally in Illinois on Saturday night.

On Monday, he tweeted without providing evidence, "Many Gang Members and some very bad people are mixed into the Caravan heading to our Southern Border."

"Please go back," he urged them, "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!"

It's possible there are criminals mixed in, but Trump has not substantiated his claim that members of the MS-13 gang, in particular, are among them.

The troops are expected to perform a wide variety of functions such as transporting supplies for the Border Patrol, but not engage directly with migrants seeking to cross the border, officials said. One U.S. official said the troops will be sent initially to staging bases in California, Texas and Arizona while the CBP works out precisely where it wants the troops positioned. U.S. Transportation Command posted a video on its Facebook page Monday of a C-17 transport plane that it said was delivering Army equipment to the Southwest border in support of the operation.

The U.S. military has already begun delivering jersey barriers to the southern border in conjunction with the deployment plans.

------

Associated Press writers Elliot Spagat in San Diego and Lolita C. Baldor in Prague contributed to this report