WASHINGTON (AP) — The Pentagon on Friday approved a request for additional troops at the southern border, likely to total several hundred to help the U.S. Border Patrol as President Donald Trump seeks to transform fears about immigration and a caravan of Central American migrants into electoral gains in the midterms.

Defense Secretary Jim Mattis signed off on a request for help from the Department of Homeland Security and authorized the military staff to work out details such as the size, composition and estimated cost of the deployments, according to a U.S. official.

Mattis, who is traveling in the Middle East, is expected to approve the actual deployments after all the details are ironed out, according to the official, who spoke on condition of anonymity to discuss planning that has not yet been completed or publicly announced.

The action comes as Trump has spent recent days calling attention to the caravan of Central Americans slowly making their way by foot into southern Mexico, but still more than 1,000 miles from U.S. soil.

Trump, who made fear about immigrants a major theme of his 2016 election campaign, has been eager to make it a top issue heading into the Nov. 6 midterm elections, which will determine control of Congress. The president and senior White House officials have long believed the issue is key to turning out his supporters.

The additional troops, possibly numbering 800 or more, would provide logistical and other support to the Border Patrol, said the official. This likely would include military engineers, aviators and perhaps military police to assist with security. No combat forces are to be deployed, but because some troops may be armed for self-defense, Pentagon lawyers were working out rules governing the use of force before final deployment decisions are made, the official said.

It’s not unusual for the National Guard to help with border security. Although active duty troops are sometimes called on for domestic emergencies like hurricanes or floods, they rarely deploy to the southern border. Fears of militarizing the border were fanned by a May 1997 incident in which a Marine on a counter-narcotics mission shot to death an 18-year-old who was herding goats in Redford, Texas.

In the current situation, active duty troops will not be on armed security missions.

The additional members of the military would assist the Border Patrol by providing things such as vehicles, tents and equipment. There already are about 2,000 National Guard troops there under a previous Pentagon arrangement.

Trump has used the caravan to bolster his election-season warnings that the U.S. is being infiltrated by illegal immigrants “pouring across the border,” whom he has painted with a sinister brush.

He has claimed without any apparent basis in fact that “Middle Easterners” were among the shirking group. At rallies and on Twitter, Trump has tried to portray the Democrats as pro-illegal immigration, even claiming, with no evidence, that Democrats had organized and paid for the caravan.

He tweeted Thursday that, “Democrat inspired laws make it tough for us to stop people at the border” and said he was using the military to respond to what he called a “National Emergency.”

The migrants in the sprawling caravan — once estimated by the United Nations to number more than 7,000 — are hoping to make it to the United States. Most are Hondurans, seeking to escape the poverty and violence that plagues the region.

The caravan swelled dramatically soon after crossing the Mexican border on Oct. 19, but sickness, fear and police harassment have whittled down its numbers. Since entering Mexico at its southernmost tip, the group has advanced roughly 95 miles.

Trump tweeted a direct message to the migrants Thursday, urging them to return home.

“To those in the Caravan, turnaround,” he wrote. “We are not letting people into the United States illegally. Go back to your Country and if you want, apply for citizenship like millions of others are doing!”

The migrants have largely been disconnected from news reports about them while on the road. When asked about Trump’s tweets critical of the caravan and his vows to keep them out, they have generally responded that he should stop attacking them and said they would keep trying to reach the United States.

Trump earlier this year ordered the deployment of National Guard members to the U.S.-Mexico border to respond to a spike in illegal border crossings. But those members remain under the control of the governors of the states where they’re positioned, and their activities are limited to supportive roles, such as providing surveillance.

The addition of 800 or more active duty troops, if approved, as expected, by Mattis, is in response to a request from the Department of Homeland Security, which manages the Border Patrol, a U.S. official said.

DHS asked for help in various forms. It was not immediately clear why active duty forces were chosen, since National Guard troops can perform the same functions. Earlier this year Mattis authorized Pentagon funding for up to 4,000 National Guard troops on the border and thus far only a little over 2,000 have been used.

Federal law prohibits the use of active duty service members for law enforcement inside the U.S. unless specifically authorized by Congress.

Trump had tweeted Monday that he’d alerted Border Patrol and the military that the caravan was “a National Emergy,” but the Pentagon said then that they’d received no new orders to provide troops for border security.

But Trump told a rally crowd in Wisconsin on Wednesday that moves were underway.

“Wait’ll you see what happens over the next couple of weeks. You’re going to see a very secure border. You just watch,” he told the crowd. “And the military is ready. They’re all set.”