This week President Donald Trump summarily eliminated almost all asylum protections for Central Americans and other migrants seeking to enter the United States from the Southern border. The president’s move is legally questionable for a host of reasons, the most important being that he is attempting an end run around Congress and doing by administrative fiat what he couldn’t through normal legislative channels.

The rule, which will go into effect immediately, basically says that anyone—men, women, children, even unaccompanied minors—who pass through another country first will be ineligible for asylum at the U.S. southern border unless they first apply for and are denied asylum in the countries on the way. Migrants already in America will be exempted, even if they entered without authorization between ports of entry. But perversely, Central American migrants who listened to the administration and waited in Mexico to come in legally through an official port of entry will be out of luck.

The administration hopes this change will end the recent rush of migrants from Guatemala, El Salvador, and Honduras—never mind that one reason for said rush is precisely that these migrants feared Trump would pull some stunt like this and wanted to get here first.

Can Trump’s new rule withstand the court challenges that have already been filed? It’s unlikely.

For starters, this is not just a rule: It is an “interim final rule” jointly issued by the Department of Homeland Security and the Department of Justice. As such, it dispensed with normal rule-making niceties—minimum notice requirements, comment periods, etc. —that are typically required before a change of such magnitude.

The administration says it can do this because the country is facing a border emergency. Attorney General William Barr insists the border is “overwhelmed by the burdens associated with apprehending and processing hundreds of thousands of aliens.” But to the extent that border resources are “overwhelmed,” it is because of the administration’s zero tolerance policy. Under this approach, the administration puts everyone—even asylum seekers who pass the initial “credible fear” screening—in detention rather than releasing them to wait with their friends and family in the country while immigration courts hear their asylum claims, as previous administrations have done. So this “emergency” is of the Trump administration’s own making.

The administration has repeatedly tried to use the emergency argument to persuade Congress to close the alleged loopholes in asylum law that it claims have made America a migrant magnet (such as the 1997 Flores settlement, which requires migrant parents with kids to be released from detention within 20 days). So far, Congress hasn’t bought any of this. If Congress ain’t buying it, the courts probably won’t either. As Margaret Stock, an immigration lawyer with the Federalist Society, tells me, President Harry Truman couldn’t even persuade the Supreme Court that the Korean War was enough of an emergency to let him seize private steel mills to preempt a strike and keep wartime production going. The Trump administration’s asylum move will raise similar concerns, Stock notes.

Furthermore, the new rule will run afoul of long-standing international and American legal requirement that asylum seekers be given a due hearing. America is required to hear migrants’ cases unless they are coming through countries with whom the U.S. has a Safe Third Country Agreement. Such a country has to offer a similar level of safety, security, and due process as the United States. The only country that currently has such an agreement with America is Canada. The agreement makes it incumbent upon Canada to consider the asylum petition of migrants on its soil rather than just letting them into the United States. Only if Canada denies their petition can they apply for asylum in America.

The administration is trying to strong-arm Mexico and Guatemala into signing similar agreements, which would require these countries to offer permanent asylum to migrants rather than merely temporarily warehousing them. But even if these countries agree, U.S. courts are unlikely to be convinced that the new rule is kosher. Why? Because these countries, particularly Guatemala, aren’t “safe.”

The U.S. government’s own assessment shows that Guatemala, through which migrants from El Salvador and Honduras must pass when moving north, is one of the most dangerous countries in the world. Women in Guatemala face extremely high rates of murder, and children are often targeted for sex trafficking or forced to join gangs. Things are so bad that in the past nine months, around 190,000 Guatemalans fled to neighboring countries—and about half of the Central American migrants flocking to America are in fact Guatemalans. So even under the new asylum rules and a Safe Third Country agreement with Guatemala, the administration couldn’t send fleeing Guatemalans back to their country; that would be refoulement, or a forcible return to an active danger zone, which is legally prohibited. And if America can’t send Guatemalans back to their own country because it is too dangerous, how can it send Hondurans and Salvadorans there?

Trump thinks he can make America safe by turning it into a fortress. In fact, he is creating the conditions for major continental upheavals that will turn a fake emergency into a horrendously real one. If fleeing Central American migrants are “overwhelming” America’s border to the point of a crisis, what will happen to Mexico and Guatemala, far less prosperous and stable countries, if they are forced to absorb all of them?

Courts are going to have a hard time keeping a straight face listening to some of the administration’s tortuous legal rationales. So why is Trump doing this? He is grandstanding to stir up his base and keep alive the notion that America is under siege. He hopes to translate a legal loss into a political victory—asylum seekers, America, and the region be damned.

A version of this column originally appeared in The Week