President Trump said Wednesday that he would deploy as many as 15,000 military personnel to the border with Mexico in response to caravans of Central American migrants making their way northward, doubling the figure Pentagon officials have announced would be operating there. 

“We’ll go up to anywhere between 10 and 15,000 military personnel on top of Border Control, ICE and everybody else at the border,” Trump said in remarks to reporters before departing Washington for a campaign rally in Florida. “Nobody’s coming in. We’re not allowing people to come in.”

Trump’s comments came a day after the general in charge of the border deployment said 5,239 active-duty troops would be heading to the border with more potentially to follow, in addition to the 2,092 members of the National Guard already there. 

It wasn’t clear whether Trump’s 15,000 figure included the National Guard deployment.

If the deployment reaches 15,000 troops, it would be roughly equivalent to the size of the U.S. military’s presence in Afghanistan and three times the size of the presence in Iraq. Already, the deployment is believed to be the largest of its kind in more than a century. 

“The number of troops deployed will change each day as military forces flow into the operating area, but the initial estimate is that [the Defense Department] will have more than 7,000 troops supporting DHS across California, Arizona and Texas,” U.S. Northern Command said in a statement issued shortly after Trump spoke.

Critics say the president’s decision to announce the deployments just days before the election is a political stunt designed to fire up a base concerned about immigration.

Defense Secretary Jim Mattis, speaking to reporters at the Pentagon, rejected the criticism on Tuesday, saying the military was deploying to support the Department of Homeland Security and Customs and Border Protection. 

“The support that we provide to the Secretary for Homeland Security is practical support based on the request from the commissioner of customs and border police, so we don't do stunts in this department,” Mattis said. 

The defense secretary said the military had carried out similar missions within the United States following natural disasters. “We are there in support of the Secretary of Homeland Security, who needs additional military assistance,” he said. 

A retired Marine Corps general, Mattis has long prioritized protecting the military from politicization, regularly emphasizing the apolitical traditions of the American armed forces. Deploying forces domestically in relation to such a politically charged issues risks eroding the public support that the armed forces enjoy with the American public. 

Officials in Washington say that if thousands of migrants make it to the border and attempt to force their way through a crossing, the military will be needed and should be in place well in advance. The officials also hope the deployment will help deter the caravans from proceeding.

Two caravans, each with more than 3,000 travelers, are trailed by at least two other groups of several hundred migrants. Many are fleeing poverty and violence in Honduras and intending to seek asylum in the United States. At the speed they are moving, they are weeks away from the border.

The military’s active-duty deployment, dubbed Faithful Patriot, will send planning teams to coordinate operations, helicopter companies to move around CBP personnel, engineer battalions to construct barriers and medical units to treat patients, according to U.S. Northern Command. The forces will also erect temporary housing to support CBP and military personnel.

Northern Command, which is overseeing the deployment, has identified 13 bases in Arizona, California and Texas close to the operations area near the border that will serve as primary logistics hubs for the deployment. 

In addition, the command listed 38 units from 14 bases that had been identified to deploy to the southwest border. 

Travis Sharp, a research fellow at the Center for Strategic and Budgetary Assessments, estimated that a deployment of 15,000 active-duty troops through mid-December would cost from $90 million to $110 million. He calculated a 10,000-troop deployment of active-duty forces would cost about $60 million to $75 million.

Gen. Terrence O’Shaughnessy, commander of Northern Command, said Tuesday that he could not give an estimate of the operation’s cost.