“The military has all of a sudden been placed in a highly politicized environment regarding immigration,” retired Lt. Gen. David Barno, who commanded U.S. forces in Afghanistan, said of the surge of troops to the border.

The blunt criticism of the mission to block what Trump contends is a threatening caravan of migrants encouraged by Democrats reflects the strain that his unusual presidency has put on one of America’s most important norms: the tradition of an apolitical military.

AD

AD

Other presidents have deployed forces to the border. But the timing of this deployment and the questionable need for it, with the caravan at least a month away from the border with Mexico and diminishing in size, have led many former military officers to deliver their harshest criticisms yet of Trump.

It has also put Secretary of Defense Jim Mattis, who has worked to keep the military out of politics, in a tough spot. Asked this week if the deployment was a “political stunt,” the former Marine general bristled, “We don’t do political stunts.”

The president has cast the caravan as containing potential terrorists and other “tough” men who would particularly pose a threat to women — who are among the most sought-after voters in Tuesday’s election. In fact, women and children are commonplace among the caravaners, who have said they intend to seek legal asylum in the United States.

AD

AD

In a tweet Thursday, retired Gen. Martin Dempsey, a former chairman of the Joint Chiefs of Staff, called the border operation a “wasteful deployment of over-stretched Soldiers and Marines.”

Dempsey’s tweet echoed the opinion of several other senior military officers who weighed in on social media or in interviews.

“I see no threat requiring this kind of deployment,” retired Gen. Colin Powell, also a former chairman of the Joint Chiefs, told The Washington Post.

Retired Lt. Gen. Jim Dubik, who oversaw the effort to build the Iraqi army and police, said that Trump’s description of the migrant caravan as an “invasion” was wrong. “A sizable portion of those coming are women and children,” he said.

AD

The public criticism from former military officials raised questions about why the president had decided to dispatch such a large force on such short notice days before a critical election.

AD

“The real issue is whether the military is being used for partisan political purposes,” said Dubik, a senior fellow with the Institute for the Study of War. “If that’s the case, then I think such a use represents not just a wasteful deployment but a dangerous one. It’s dangerous because it will politicize the use of force in ways a democracy should avoid.”

Retired Col. Paul Yingling, who commanded U.S. troops in Iraq, was more blunt.

“This operation is a political stunt,” he wrote for the military publication Task & Purpose.

AD

More than any other president in recent decades, Trump has spoken of the military as if it were part of his political base, rather than an apolitical defender of the nation. He placed several retired generals in his cabinet. In speeches before military audiences, at which presidents usually steer clear of politics and focus on foreign policy or praise troops for their sacrifice, Trump has bragged to the troops about the size of his electoral win.

AD

“We had a wonderful election, didn’t we?” he said in a speech at MacDill Air Force Base in Tampa a few months after his inauguration. “And I saw those numbers, and you liked me, and I liked you.”

Trump hit that same theme Thursday night at a rally in Missouri. “The military is for us,” he said. “The vets are for us. The veterans are all for us.”

AD

The deployment of the troops to the border, however, pushed Trump and the White House into new territory and prompted an almost unprecedented response from former officers such as Dempsey who had vowed to play an apolitical role.

Two years ago, in the midst of one of the most contentious presidential campaigns in U.S. history, Dempsey criticized some of his fellow retired generals for picking a side in the bitter political fight.

“The military is not a political prize,” the retired chairman of the Joint Chiefs wrote in a letter to The Post. Service personnel, and the public, “should not wonder about the political leanings and motivations of their [military] leaders,” he said

AD

AD

His description Thursday of the border mission as “wasteful” drew approval from many of his fellow generals, even as it prompted others to wonder if he and others had gone too far.

“While it is certainly fair to criticize the policy decision to send more troops to the border, I worry about characterizing the mission the way that some have,” said retired Gen. Carter Ham, head of the Association of the United States Army, which advocates for the service’s mission. “The troops need to know that they have our support, whether we agree with the deployment or not. . . . I think this is one of the important lessons of Vietnam.”

In the recent past, the Pentagon has seemed to go out of its way to ensure that U.S. military operations did not bleed into domestic politics. U.S. soldiers and Marines were in place for an offensive against insurgents in the Iraqi city of Fallujah several weeks before the 2004 U.S. presidential election, but the assault was delayed until days later, on Nov. 7.

AD

AD

Top Marine officers, including Mattis, who was then a major general, worried that launching a massive assault on the city could be viewed by partisans on both sides as an attempt to influence the electoral outcome.

As defense secretary, Mattis has worked to insulate the military from the country’s increasingly toxic political battles. Unlike other secretaries, he refused early in the administration to lavish Trump with praise at a cabinet meeting.

Last spring, in remarks that went viral, he advised U.S. troops in Jordan to “hold the line until our country gets back to understanding and respecting each other and showing it.”

Mattis’s political independence has raised questions in the president’s mind about his loyalty. “I think he’s sort of a Democrat, if you want to know the truth,” Trump told CBS’s “60 Minutes” recently.

AD

AD

It’s not clear whether Mattis advised Trump to delay the border deployment or whether he was consulted about the president’s decision.

“The president thinks out loud and will make statements about things he wants to do that haven’t emerged out” of discussion with his national security team, said Peter Feaver, a top official in George W. Bush’s White House.

Feaver speculated that Mattis likely would have advised Trump to delay the deployment until after the election to “take politicization out of the equation.”

“But that ship has sailed,” ­Feaver said. “Given where we are, it’s a little late for that.”

Instead, he said, he would advise Mattis to make the best of a bad situation.

Trump made Mattis’s job more difficult Thursday when, after a White House speech on immigration, he said that U.S. troops should be authorized to open fire on unarmed migrants if they appear to pose a threat. “When they throw rocks like they did at the Mexico military and police, I say consider it a rifle,” Trump said. His remarks drew a torrent of criticism from former military officials.

AD

Dempsey said the troops would ignore the order. In a tweet, retired Lt. Gen. Mark Hertling, who commanded the 1st Armored Division in Iraq, called it “unlawful.”

“There is no leader in the military . . . who would allow a soldier to shoot at an individual throwing a rock,” he wrote.

On Friday, Trump backed away from that heated rhetoric.

“They won’t have to fire,” he said. “What I don’t want is . . . these people throwing rocks.”

In fact, the military’s rules of engagement make it highly unlikely that U.S. troops could find themselves standing toe-to-toe with rock-throwing migrants. A spokesman for U.S. Northern Command, Mike Kucharek, said that while in the United States, troops can deploy with their weapons stored, but Mattis and Air Force Gen. Terrence O’Shaughnessy, who oversees the command, must authorize them to be armed.

An internal Pentagon document obtained by The Post said that lethal force was authorized in the operation only in situations “where lesser means have failed or cannot be reasonably employed.” Active-duty troops, which are functioning only in a support role, are also not permitted to arrest the migrants.