US President Donald Trump speaks during an election rally in Murphysboro, Illinois on October 27, 2018.

President Donald Trump says the number of military troops deployed to the U.S.-Mexican border could reach 15,000 — roughly double the number the Pentagon said it currently plans for a mission whose dimensions are shifting daily.

The Pentagon says "more than 7,000" troops were being sent to the southwest border to support the Customs and Border Protection agents. Officials said that number could reach a maximum of about 8,000 under present plans.

The troop numbers have been changing at a dizzying pace, with Trump drawing a hard line on immigration in the lead-up to the midterm elections.

Just last week officials were indicating that about 800 to 1,000 might be sent. On Monday, officials announced that about 5,200 were being deployed. The next day, the Air Force general running the operation said more than the initially announced total were going, and he pointedly rejected a news report that it could reach 14,000, saying that was "not consistent with what's actually being planned."

Gen. Terrence O'Shaughnessy, the commander of U.S. Northern Command, told reporters the number would exceed the initial contingent of 5,200, but he offered no estimate of the eventual total.

Just 24 hours later, Trump thrust new uncertainty into the picture, catching the Pentagon by surprise.

With his eyes squarely on Tuesday's contests, Trump has rushed a series of immigration declarations, promises and actions as he tries to mobilize supporters to retain Republican control of Congress. His own Republican campaign in 2016 concentrated on border fears, and that's his focus in the final week of the midterm fight.

"As far as the caravan is concerned, our military is out," Trump said. "We have about 5,800. We'll go up to anywhere between 10,000 and 15,000 military personnel on top of Border Patrol, ICE and everybody else at the border."

Later Wednesday, Trump told ABC News, "We have to have a wall of people."

His comments were the latest twist in a story that has pushed the Pentagon unhappily into the political space, prompting questions about whether Defense Secretary Jim Mattis was allowing the military to be leveraged as a political stunt.

"We don't do stunts," Mattis said Wednesday.

Trump rejected the idea he was "fearmongering" or using the issue for political purposes, but his escalating rhetoric in the waning days of the campaign season calls that denial into question. Trump has railed against illegal immigration, including several caravans of migrants from Central America slowly moving on foot toward the U.S. border. The caravan of an estimated 4,000 people is still nearly 1,000 miles (1,600 kilometers) from the border. Several smaller groups, estimated at a combined 1,200 people, are farther away.

Trump insisted the media is underestimating the caravans. "You have caravans coming up that look a lot larger than it's reported actually. I'm pretty good at estimating crowd size. And I'll tell you they look a lot bigger than people would think," he told ABC.

He has also promised to end so-called catch-and-release policies by erecting tent cities to hold those crossing illegally. And this week he is asserting he could act by executive order to unilaterally end birthright citizenship for the children of non-U.S. citizens.

Trump's comments left some in the Pentagon scratching their heads. Officials said they had no plans to deploy as many as 15,000 troops. The number conceivably could reach 10,000, counting the 2,100 National Guard soldiers who have been operating along the border for months as part of a separate but related mission. The number of active-duty troops tapped for deployment stood at 7,000 as of Wednesday but could reach 8,000.

A deployment of 15,000 would bring the military commitment on the border to roughly the same level as in war-torn Afghanistan. And it would more than double the number of people thought to be in the caravans.

Trump did not back down Wednesday from his controversial proposal to upend the very concept of American citizenship. In a morning tweet, he said the right to citizenship for babies born to noncitizens on American soil "will be ended one way or the other."

He also claimed that what he terms "so-called Birthright Citizenship" is "not covered by the 14th Amendment."

However, the text of the amendment's opening Citizenship Clause is this: "All persons born or naturalized in the United States and subject to the jurisdiction thereof, are citizens of the United States and of the State wherein they reside." The citizenship proposal would inevitably spark a long-shot legal battle over whether the president can alter the long-accepted understanding that the 14th Amendment grants citizenship to any child born on U.S. soil, regardless of his parents' immigration status.

House Speaker Paul Ryan asserted Tuesday that "obviously" Trump could not upend that policy by executive order, drawing a tweeted rebuke from Trump. He said Wednesday that Ryan "should be focusing on holding the Majority rather than giving his opinions on Birthright Citizenship, something he knows nothing about!"

Speaking to reporters before leaving the White House for a campaign rally in Florida, Trump compared his plan to act by executive order to President Barack Obama's much-maligned decision to use executive action to provide protections from prosecution and a path to work status for some people brought to the U.S. illegally as children.

"If he can do DACA, we can do this by executive order," Trump said, using the acronym for the Obama-era Deferred Action for Childhood Arrivals program. Trump and his Justice Department have argued that Obama action was unlawful.

Trump and many top aides have long seen the immigration issue as the most effective rallying cry for his base of supporters. The president had been expected to announce new actions at the border on Tuesday, but that was scrapped so he could travel instead to Pittsburgh, where 11 people were massacred in a synagogue during Sabbath services.