Last week Donald Trump issued an executive order modifying the administration’s immigration internment program to temporarily halt family separations. In that order, the president also directed the Department of Defense to carry out immigration detention. Additionally, there are reports that Trump has asked the U.S. military to prepare to house up to 20,000 immigrants including children. And the Department of Justice has reportedly referred immigration prosecution to military attorneys. Can President Trump lawfully order the military to detain civilian immigrants in the United States and require military lawyers to prosecute them? There is good reason to say no—and to dread what will happen if the military says yes.

The Posse Comitatus Act prohibits the military from executing domestic laws. Other laws create limited exceptions that permit military participation in domestic law enforcement in emergency situations and assignment of military lawyers, or JAGs, to domestic law cases. These laws properly limit the military to its critical role—armed conflict against foreign armed enemies—and keep it out of domestic deployment against unarmed civilians. The laws preserve public support for the military by preventing military police action against citizens or participation in divisive policy disputes in the U.S. Service members don’t fight unarmed civilians, and they don’t take sides in political fights.

These laws also give the secretary of the Department of Defense shared discretion with the attorney general to decide whether there is an emergency that allows military participation in domestic law enforcement. The JAG statute in the U.S. Code gives DOD sole discretion to decide whether to assign JAG lawyers to work outside of military cases.

It would seem clear from this that DOD may decline an order to carry out Trump immigration internment, as this falls squarely within prohibited domestic law enforcement. The laws being enforced are domestic U.S. civil laws, and their execution would happen in America. Nonetheless, Secretary of Defense James Mattis seemed to commit the DOD to internment. As to JAG lawyers, it is entirely up to the military whether to assign them non-military duties. But apparently the Pentagon has approved a request to send military lawyers to the border to help prosecute these cases. These decisions are terrible mistakes.

Immigration at the southern border is not an emergency that allows military participation under these laws. The immigrants are not armed, and statistics show they are not dangerous—immigrants commit less crime than native-born residents. Nor is it necessary to detain immigrants to prevent them from fleeing before immigration hearings, the ostensible purpose for Trump internment. Studies show that alternatives, such as placing monitors on immigrants and requiring periodic check-ins, result in up to 99 percent of immigrants complying, rather than fleeing. The inability of the government to intern the number immigrants detained is not an emergency that needs support, it is a crisis that Trump created by requiring unnecessary detention that needs to be ended. Detention is not required by law, and there are effective alternatives to detention that are more humane, less expensive, and less consumptive of military resources.

But what about the president’s constitutional authority as commander in chief of the armed forces and the necessity of civilian control over the military? This presidential authority over the military is limited to lawful orders, and it is unlawful for the military to execute domestic laws, including immigration laws. Moreover, Trump’s program is itself likely unlawful. There are many legal challenges to the program—and a preliminary injunction ruling it a violation of the Constitution’s Due Process Clause. Even the Trump executive order revising the program almost surely is barred by an existing court order limiting the duration of family detention.

Assumption of domestic civilian internment responsibilities on this scale, and on so controversial a program, on a punitive rather than protective mission, would remove guardrails against military policing and allow frighteningly broad presidential authority to deploy the DOD in America. Think about this for a moment. The Supreme Court just ruled that presidential authority allows an immigration ban with an indisputably disparate impact on Muslims, ignoring undisputed evidence that the ban was in fact motivated by anti-Muslim discrimination. What happens if Trump (or a future president) uses the Supreme Court’s Muslim ban decision as a legal basis to invoke a policy area where the president has broad authority typically deferred to by courts—national security, for example—and combines this with a virtually unlimited authority to use the military to prosecute and detain people? As with so many issues, Trump’s statements raise chilling concerns about who he might act against. For example, look at this week’s Trump threat to impose “LAW AND ORDER” on “radical protesters.”

This is not to suggest our legal and moral concern ought to be with who will next be hurt by abandonment of restraint on domestic military prosecution and detention. Who will be hurt now by this illegal and immoral use of the military is enough to stop it before it happens. Military internment of civilians will shatter the lives of those detained and damage the military in irremediable ways, as it has before. It is worth observing, though, that once we allow this historic departure of permissible military deployment it is hard to imagine where it stops—particularly in the hands of this most untrustworthy and authoritarian of presidents.

A consideration of the possible disastrous consequences of military implementation of the internment program further demonstrates the wisdom of laws keeping the military out of domestic law enforcement.

This is not to suggest our legal and moral concern ought to be with who will next be hurt by abandonment of restraint on domestic military prosecution and detention.

The internment program is racially divisive and, like the whole of Trump’s immigration strategy, its harm falls almost entirely upon Latinos and blacks. Many in the military are Latinos, blacks, immigrants, or naturalized Americans, and many more are close to immigrants as family and friends, and still others are deeply offended by immigration policies which collectively remove or bar millions of people of color from the country and treat them harshly. This mission would compromise the personal and ethical identity of many in service, undermine unit cohesion, conflict with the military’s history of racial equality, and hurt recruitment and retention of minorities who are serving in increasing numbers.

The internment program’s cruelty cannot be controlled by the military because other agencies are involved. When reports surface of abuse of detainees, including children stripped from families, the military would be degraded by participation in an inhumane program. Internment has just begun, and it is hard to imagine that there will not be continuing abuses and more damaging revelations. Association with cruel treatment of civilian foreigners is dangerous to the military’s global reputation. It would be harder for allies to cooperate with our military and give adversaries a propaganda tool for rallying support against U.S. troops. Pictures of service members marching civilians into detention or prosecuting them could be used by enemies to present themselves as protectors of their own civilians against similar American mistreatment.

It is not healthy for the military to be involved in mass action against civilians. Much of the culture of military law, ethics and honor is built on the distinction between enemy combatants and innocent civilians. Most in service are motivated by responsibility for defending against lethal armed enemies, and all are meticulously trained to protect unarmed civilians. The immigrants interned are overwhelmingly poor, traumatized families, victims themselves of horrific warlike violence and abuse. Refugees seeking asylum are hardly the sort of enemy troops sign up to fight.

Participation in the internment program would also plunge the military into one of the most deeply polarizing policy debates in the country. This would politicize the military and rob it of the impartiality that contributes to its domestic support. It cannot be ignored that this president would almost surely present the military as supportive of his immigration strategy and smear opponents as unpatriotic and against the troops.

There are already reports that service members are strongly against forced participation in Trump immigration internment. As the Daily Beast reported:

“I’m not banking on the president having good will towards people of my nationality,” said an active-duty military officer of Mexican descent currently stationed at Fort Bliss in El Paso, one of the sites under consideration for the detention camps.

Internment “is a disaster that stands against everything the military value system is supposed to be,” said a U.S. Air Force intelligence officer.

The most recent experiences with mass military detention of civilians—at home or abroad—demonstrate how horribly wrong this can go. The internment of Japanese Americans in World War II is one of the most shameful chapters in U.S. history, so much so that the government apologized and paid reparations to families of those interned. Even the Supreme Court that approved the Trump Muslim ban overruled the 1944 Korematsu decision upholding Japanese-American internment. Moreover, of the tens of thousands of detainees held by the U.S. in post-9/11 conflicts in Iraq and Afghanistan, many ended up being released as civilians, leading to the most damaging scandal in the modern history of the military.

The DOD should resist the temptation to skirt legal controversy by claiming it is following orders to participate in the internment program. “We were following orders” is the alibi of atrocity, and military leaders should foresee that the Trump internment program is destined to make a very short and infamous list of American betrayals of people and principle.

Instead, Mattis should say, “No Mr. President, we’re not doing that, and our lawyers will send a memo explaining why.” If he does not, other lawyers should file suit to stop the military from an illegal, cruel, and self-destructive mission to intern civilian immigrants.