Donald Trump’s dispatch of thousands of US military troops to the southern border is a hastily planned campaign stunt that takes soldiers from other duties and leaves the Pentagon with the bill.

That is the assessment of current and former federal and congressional staffers and civilian military analysts who spoke to Quartz.

Some 5,200 active-duty troops are to be sent to the border with Mexico between now and mid-December, the administration announced Oct. 29, to help immigration officials “harden the border” against a caravan of asylum seekers traveling on foot. That number could increase to 15,000, Trump said Oct. 31, on top of about 2,000 National Guard troops dispatched in April.

The announcement, in the days before the Nov. 6 midterm elections, has been characterized by Trump critics, former administration officials, and even some Trump supporters as timed to tell voters that Republicans are tough on border security. The move is not addressing any legitimate security threat. “This is such an election issue for Trump,” said one former Department of Homeland Security official, who added that there’s a feeling right now in the White House that “we’re not doing enough to stop illegal immigration.”

Fox News correspondent Geraldo Rivera has chided his “friend” Trump on the move, calling it “all show.”

The Pentagon is scrambling

The Department of Defense is still trying to figure out where, exactly, the troops are going to come from. Homeland Security, which is in charge of border security, isn’t expected to reimburse the Pentagon for the exercise, and won’t be in charge of the troops themselves, several officials said. “The DoD Comptroller is reviewing DoD accounts to fund this mission with minimal disruption to readiness and other DoD missions,” a military spokesman told Quartz. He couldn’t give an estimate for the cost because it “planning was still underway.”

The troops will fill a hole for Homeland Security. Its Customs and Border Protection (CBP) and Immigration and Customs Enforcement (ICE) divisions have spent hundreds of millions to try to hire thousands more personnel for months, a government report shows. They’ve been unsuccessful, with CBP losing more employees than it gains, and new hires at ICE dropping, Government Executive reported in July.

Members of Congress who have oversight of the defense budget, like those on the armed services and appropriations committees, first heard about the plan to send troops to the border when they read about it in the Wall Street Journal Oct. 29, two congressional aides told Quartz.

The total number of troops that could be dispatched are just a tiny fraction of the US military’s approximately 1.3 million active-duty personnel. While the exercise is expected to cost tens of millions, it’s a drop in the bucket compared to the Defense Department’s annual budget of more than $700 billion. But it takes away from other things the US military should be doing, defense experts said. Previous presidents’ assignment of troops to the border to control immigration have been criticized as costly mistakes by the federal government itself.

“The cost can pretty easily be absorbed within existing funds for operations and maintenance,” said Todd Harrison, director of defense budget analysis at the Center for Strategic and International Studies. ”The bigger question is the opportunity cost of this, because the troops deployed for this activity will not be ready and available for other contingencies that may arise,” he said, and they could miss training exercises which will need to be made up in the future.

And what will troops do?

Some military veterans have criticized the troop mobilization, saying it will keep military personnel away from their families to fight a non-existent threat. Questions also remain about what, exactly, the troops will do, a situation that mirrors past, fraught dispatches of troops. “There has historically been some cordial disagreements between the DoD and DHS around what these troops are supposed to be doing,” said Blas Nunez-Neto, a senior policy researcher with the Rand Corporation. Troops sent to the border in recent years have wanted to do sophisticated security-focused work, like high-tech surveillance, and were instead assigned to fix infrastructure like roads and fencing instead, he noted.

Air Force general Terrence J. O’Shaughnessy, who will be in charge of the operation, said Oct. 29 the troops would come with transport planes, heavy equipment and razor wire. He didn’t explain what the troops will be doing beyond “supporting CBP in hardening the southwest border.” A DHS spokeswoman couldn’t provide any further information.

Arizona National Guard troops dispatched to the border on Trump’s order in April are, quite literally, shoveling shit: they’re cleaning up after CBP agents’ horses, as well as fixing their vehicles’ flat tires, Politico reported in June.