Frustrated in his efforts to secure funding for his “beautiful border wall” by both Mexico (which has refused to pay for the undertaking) and Congress, President Trump has vowed to militarize the nation’s southern frontier.

“We are preparing for the military to secure our border between Mexico and the United States,” Trump blustered at a White House press conference Tuesday. On Friday, Secretary of Defense James “Mad Dog” Mattis followed up on Trump’s proclamation, ordering the deployment of up to 4,000 National Guard troops to the border. Under the terms of Mattis’ order, the troops will act under the control of the respective governors of the states from which they will be drawn—primarily Arizona, New Mexico, Texas and, if Gov. Jerry Brown agrees (so far, he hasn’t), California.

Bluster and bombast are part of the diurnal cycle in Trumpland, but is the threat to militarize the border really something new and especially dangerous?

In 1989, for example, Gen. Colin Powell established the Joint Task Force North (formerly the Joint Task Force Six), a multi-service operation run by the Department of Defense (DOD), consisting of, among other entities, the National Guard, the Coast Guard, U.S. Customs and Border Protection (CBP), U.S. Immigration and Customs Enforcement (ICE), and regular Army troops, to aid in President H.W. Bush’s war on drugs. The task force, which still exists, is credited with conducting more than 6,400 missions and helping to seize $15.2 billion in illegal drugs.

In 2006, President George W. Bush went one step further than his father, initiating “Operation Jump Start,” under which 6,000 National Guard troops were called up in California, Arizona, New Mexico and Texas to support the Border Patrol. The undertaking lasted two years, during which time the Guard assisted in 176,000 arrests and the seizure of 316 pounds of marijuana and over 5,000 pounds of cocaine.

In 2010, the Obama administration launched “Operation Phalanx,” under which 1,200 National Guard personnel were dispatched to the border for two years. According to the Pentagon, the troops assisted in the apprehension of nearly 18,000 undocumented people and the seizure of 56,000 pounds of marijuana.

The combined cost of the Jump Start and Phalanx programs exceeded $1.3 billion.

The great fear is that Trump’s deployment of 4,000 National Guard troops represents only a beginning rather than a ceiling. Given Trump’s incendiary anti-immigrant rhetoric, his Muslim travel bans and the “zero tolerance” policies of Attorney General Jeff Sessions on illegal border crossings, the fear is well founded.

Still, the fears are tempered by long-standing federal statutes that limit the use of the military to enforce domestic civil law, including immigration law. Such statutes constrained both the Jump Start and the Phalanx operations and those conducted by the Joint Task Force and limited the work of the National Guard to a largely supplemental role in relation to ICE and the Border Patrol.

Foremost among the limiting statutes is the Posse Comitatus Act (PCA) of 1878. Codified today at Title 18, Section 1385 of the United States Code, the act provides:

“Whoever, except in cases and under circumstances expressly authorized by the Constitution or Act of Congress, willfully uses any part of the Army or the Air Force as a posse comitatus or otherwise to execute the laws shall be fined under this title or imprisoned not more than two years, or both.

Although the law does not expressly apply to the Navy or the Marines, DOD regulations and other legislation and federal court decisions have clarified that it applies to those branches of the service as well.

The act has its legislative roots in the Reconstruction era, when federal troops were used extensively throughout the former Confederacy to safeguard voting rights and enforce civil order. Signed into law by President Rutherford B. Hayes as part of a sweeping political compromise between the two major parties to resolve the disputed election of 1876, the legislation was designed to prevent the use of the military as a national police force and to return law enforcement to local authorities and non-military federal agencies.

Since then, the PCA has stood in principle as a bulwark against the use of the military on American soil. The problem, however, as summarized by the Rand Corp., is that there are several key exceptions to the restrictions of the PCA, which the Trump administration could exploit.

For starters, the administration could ramp up the workload of the Coast Guard. Unlike the Army, Air Force, Navy and Marines, the Coast Guard is exempt from the PCA and may pursue, search and seize vessels and persons in territorial waters on suspicion of drug trafficking or illegal entry. Further, all branches of the military may, without violating the PCA, engage in aerial photography and visual search and surveillance of the border.

In addition, another vintage law—the Insurrection Act (IA) of 1807—provides the president with other opportunities to deploy the military (both active and reserve) inside the country. Among other provisions, the IA empowers the president to call up the “militia of any states” or the armed forces to suppress rebellions and insurrections that hinder the execution of the laws of any state or the United States.

The Insurrection Act was invoked by President Dwight Eisenhower in 1957 to enforce court-ordered school integration in Little Rock, Ark.; in 1967 by President Lyndon Johnson in response to riots in Detroit; and by President George H. W. Bush in 1992 to help quell the Rodney King disturbances in Los Angeles.

Most importantly for Trump’s purposes—and Secretary Mattis knows this, even if the reading-averse president doesn’t—the National Guard isn’t covered by the PCA, as long as it operates under state, rather than federal, authority.

The National Guard is the successor of the colonial state militia that are referred to in Article 1, Section 8, clauses 15 and 16 of the Constitution. Under those provisions, as well as other federal laws, the Guard is a hybrid entity that can operate either as a federalized or state military force.

If federalized (that is, directly called into service by the president or Congress), the Guard is subject to the PCA. In the immigration context, this means the Guard, like the Army, would be precluded from directly arresting undocumented people. On the other hand, if formal command and control of Guard units remain in the hands of state governors, as under Mattis’ order, there appear to be no such legal constraints, even if the DOD reimburses the states for deployments. All that is needed is the consent of the governors involved.

Thus far, the administration has not only opted to keep the National Guard under state control, it has also announced it will not deputize the National Guard and make Guard members de facto agents of ICE and the Border Patrol. In keeping with past tradition, Mattis’ current order indicates that National Guard troops will not perform law enforcement functions at the border.

But all that could change at the drop of a presidential tweet.

Think it couldn’t happen? Well, think again.

A secret 2017 draft memo prepared by the Department of Homeland Security (DHS), then headed by Gen. John Kelly, now Trump’s chief of staff, called for the deployment of 100,000 National Guard troops to enforce the administration’s planned crackdown on undocumented immigrants in 11 states.

According to the memo, a copy of which was obtained by The Associated Press and later published by Vox.com, Guard members would remain under state command and thus would be able “to perform the functions of an immigration officer in relation to the investigation, apprehension, and detention of aliens in the United States.”

Was this the much-vaunted “deportation force” Trump had promised during the campaign?

When news of the memo leaked in February 2017, the White House disavowed it. “There is no effort at all to round up, to utilize the National Guard to round up illegal immigrants,” then-White House press secretary Sean Spicer told a group of pool reporters at the time. The DHS also backed off the memo, calling it “a pre-decisional draft.”

But that was then. As anyone who has followed Trump knows, the president never seems to give up on a bad idea, and when faced with failure, he often doubles down. Even though illegal entries into the U.S. have plunged to their lowest levels since 1971, Trump can be expected to ramp up the nativist vitriol with more sweeping threats of military action.

Your support is crucial…

With an uncertain future and a new administration casting doubt on press freedoms, the danger is clear: The truth is at risk.

Now is the time to give. Your tax-deductible support allows us to dig deeper, delivering fearless investigative reporting and analysis that exposes what’s really happening — without compromise.

During this holiday season, stand with our courageous journalists. Donate today to protect a free press, uphold democracy and ensure the stories that matter are told.

SUPPORT TRUTHDIG