WASHINGTON — After President Trump ordered more than 5,000 U.S. troops to the southwest border days before the midterm election to intercept what he called an “invasion” of migrants, retired Marine Col. David Lapan decided he could not stay silent.

“The idea that a group of poor people from Central America, most of whom are women and children, pose some kind of threat to the national security of the United States is ridiculous,” Lapan said in an interview. “It’s a misuse of active duty forces.”

Lapan held senior jobs at the Pentagon while in the Marines and then served in the Trump administration as a Department of Homeland Security political appointee before departing in late 2017. He’s one of a growing number of former senior military officers who say Trump’s order to deploy troops to the border on the cusp of an election compromises the military’s traditional position as an institution shielded from electoral politics.

Trump has had rocky relations with the military since taking office, clashing with Pentagon leaders over his ban on transgender recruiting, his proposed space force and his abrupt cancellation of training exercises in South Korea.

But Trump has added unusual strain by ordering a military operation whose timing and scale seem unjustified to some officers, and by suggesting military personnel might use deadly force against unarmed migrants, instead of remaining in a support role, as required by law.

Defense Secretary James N. Mattis has issued only terse statements but has not said why a force of more than 5,000 troops — which Trump said could rise to as many as 15,000 — is needed to stop several thousand men, women and children who are heading north in hopes of applying for asylum at the U.S. border.

Asked Wednesday whether the deployment on the eve of an election was a political stunt, Mattis replied, “We don’t do stunts in this department, thank you.”

But critics have included retired Army Gen. Martin Dempsey, the former chairman of the Joint Chiefs of Staff. He broke his near- total silence on Trump after the commander in chief suggested Thursday that U.S. troops might open fire on anyone who threw rocks at them along the border.

“A wasteful deployment of over-stretched Soldiers and Marines would be made much worse if they use force disproportional to the threat they face,” Dempsey tweeted Thursday. “They won’t,” he added.

Trump pulled back Friday, saying migrants who threw rocks would be arrested and prosecuted, not shot.

Trump last faced criticism from retired military officers in August when William H. McRaven, a retired Navy admiral who was commander of the U.S. Joint Special Operations Command from 2011 to 2014, rebuked him for withdrawing the security clearance of former CIA Director John Brennan.

“I would consider it an honor if you would revoke my security clearance as well, so I can add my name to the list of men and women who have spoken up against your presidency,” McRaven wrote.

The decision to speak out is not an easy one, many military officers say, because it runs contrary to a well- established norm that even retired military personnel should refrain from commenting publicly on policy decisions by the commander in chief.

No active duty military personnel are known to have publicly criticized the border operation, though privately some say that opinions about the deployment within the military are divided, as they are among former service members.

Military personnel are instructed in training that they have a duty not to carry out orders that violate the laws of war. If they have a moral objection to a policy decision, they are expected to resign from the armed forces.

Even Trump’s critics say that he is within his legal power to order the operation, however.

“It’s always tough, especially if you are still in uniform,” Lapan said. “This isn’t an illegal order from anything I can see. Then it becomes much tougher. Is it politicization? Is it inappropriate?”

But the perception that one of Trump’s motives in sending troops to the border is to help Republicans in the election damages the military’s status as a institution that by tradition has been insulated from electoral politics, some officers said.

“It’s politicization of one of the few remaining nonpolitical institutions in the country — the United States military,” Paul Yingling, a retired Army officer, said in an interview.

Yingling warned in an article this week that “the administration aims to leverage the military’s credibility in support of its hysterical anti-immigrant propaganda campaign.” The article, titled “Advice For US Troops Sent To The Mexican Border In An Age Of Terrible Leaders,” appeared Wednesday on Task and Purpose, which calls itself “a news site for veterans, by veterans.”

Yingling warned that Trump’s decision to employ the military — and his aggressive rhetoric — could lead midlevel military commanders to push underlings into detaining suspects, seizing property and taking other actions that could violate the law.

The official Pentagon orders given to units deploying to the border describe a dire situation.

“The security of the United States is imperiled by a drastic surge of illegal drugs, dangerous gang activity and extensive illegal immigration,” it reads. “The situation at the border has reached a point of crisis and [the president] has taken action to secure our borders.”

Yingling, who deployed multiple times to Iraq and Afghanistan, said the order is unnecessarily provocative. “If a seasoned pro finds the language in the order to be combative, imagine the effect it will have on a 19-year-old fueled by Red Bull and testosterone.”

The likelihood of a confrontation between migrants and troops along the border is low. One caravan of approximately 3,500 people from Central America is still moving through southern Mexico, about 900 miles from the U.S. Others are even smaller and steadily declining in numbers.

Pentagon officials say privately that Trump has exaggerated the role the military will play; they say that it will mostly consist of equipping, transporting and feeding Border Patrol personnel.

Troops will also help strengthen crowd- and vehicle-control measures at border entry points and provide civilian law enforcement with aerial surveillance along the border. The Pentagon rejected a request from the Department of Homeland Security to have troops perform emergency law enforcement missions, including crowd and traffic control, CNN reported.

But deadly confrontations involving armed troops sent to the border to assist law enforcement have happened in the past. In 1997, an 18-year-old American was killed by a Marine near the U.S. border, an incident that led to a temporary suspension of troop patrols there.

david.cloud@latimes.com