A FEW DAYS AFTER the conclusion of the Republican National Convention, the New York Times published an article in which officials who served in the George W. Bush and Obama administrations were quoted questioning the political, logistical, and legal viability of the GOP’s platform proposal calling for the mass deportation of illegal immigrants. The tone of the piece and the views of the experts cited evinced a pre-Trump-era mindset about what the former president and his subordinates could do. Laura Collins, an immigration expert at the George W. Bush Institute in Dallas, told the Times, “It’s enormously complicated and an expensive thing to decide to deport people who have been here years.”

But historical examples suggest that enacting forced relocation, internment, and deportation is nowhere near the longshot many experts believe.

Consider the Alien Friends Act of 1798, which, as attorney and legal history scholar Wendell Bird notes in his book Criminal Dissent, gave President John Adams and his successors “virtually unchecked power” to “select and deport aliens.” The law’s passage caused many French citizens living in America and guilty of no crime to self-deport even before being formally targeted by the Adams administration. As Bird explains, “While these self-deportations were not ordered under the open-ended terms of the Alien Act, they occurred because of that law and would not have occurred in its absence.”

Bird documents how others were targeted for deportation and expelled—and in each of the known cases, the grounds were vague or spurious. The chilling effect on free speech and association was profound, and it ultimately produced a political backlash that hastened the demise of the Federalist party.

The experience did not, however, discredit the idea of politically motivated deportations, relocations, or removals. Just over forty years later, another president would use federal power to drive a entire groups of people over a thousand miles from their land and homes.

In this case, it was tens of thousands of American Indians who were moved, sometimes literally at gunpoint. As University of Georgia historian Claudio Saunt recounts in Unworthy Republic: The Dispossession of Native Americans and the Road to Indian Territory, “the United States subjected Native Americans to a formal state-administered process that produced censuses, property lists, land plats, expulsion registries, commutation certificates, and the like, all culminating in a journey, by foot, wagon, or steamboat, to lands west of the Mississippi.” Saunt estimates that the internal deportations and relocations involved more than 80,000 Native Americans, with thousands dying during the process. Over the ensuing six decades, the U.S. Army subdued the descendants of the displaced and ultimately herded them into reservations.

The twentieth century was replete with large-scale federal actions against disfavored ethnic or immigrant communities. The application of the Alien Enemy Act against unnaturalized German immigrants during the First World War allowed the government to intern German-Americans in facilities across the country. It also fueled a general anti-German sentiment resulting in violence against German Americans, and attempts to suppress German-language newspapers and discourage church services in the German language. After the war, the notorious “Palmer Raids” resulted in thousands of arrests across the United States, mostly of Italian and Jewish immigrants, of whom at least 556 were deported.

The most notorious ethnically based anti-immigrant program in American history was the internment of Japanese Americans, which saw some 120,000 people incarcerated in camps, mostly in the Western United States, during the Second World War. Less well known: Some German Americans and Italian Americans were also interned, with some deported back to their ancestral countries. From the outbreak of the war through the Cold War, the FBI also kept detailed lists of thousands of Americans it suspected—for reasons of political affiliation, ethnic background, or cultural affinity—of being sympathetic to the Axis powers or the Soviet Union for potential arrest in a national emergency. Notably, these programs did not always clearly distinguish between American citizens and foreigners.

The closest historical analogy to what Donald Trump and the Republican platform propose is the Eisenhower-era Operation Wetback, which resulted in the apprehension of over 1 million illegal immigrants, plus some American citizens of Mexican descent, and the voluntary departure of tens of thousands more under government pressure.

THESE EPISODES PUT THE LIE to the notion that the executive branch in a second Trump administration would not be able to engage in a mass internment or deportation operation. The government did so in the past, when the nation’s transportation infrastructure and law enforcement community were far smaller than they are today.

Former President Trump and his advisers understand that he failed to achieve mass deportation under his first term, which is why they are planning an end run around all the usual constraints on deportation. They are already citing broad authorities in the Alien Enemy Act, immigration authorities in Title 8 of the U.S. Code, health exclusion powers under Title 42 of the U.S. Code, and the Insurrection Act. These powers could provide Trump (or any other chief executive) with legal cover to conduct a mass deportation operation. And in cases where it seems like some law might seem to stand in the way, keep in mind that the courts have repeatedly shown unwillingness to check executive power on immigration.

The Department of Justice’s Office of Legal Counsel could be called upon to produce an opinion that a given presidential immigration action was constitutional. Such an opinion would be binding on and provide legal protection to executive branch personnel engaged in carrying out deportation-related activities, even if they were later found to be illicit, even criminal.

So in a second term, the biggest challenge for Trump’s mass-deportation agenda would likely not be legal but logistical and monetary: Would he have the money, personnel, and detention infrastructure to remove millions of people from across the country?

One or both chambers of Congress controlled by Democrats could refuse to agree to any appropriations bills designed to fund a mass-deportation program. If such funding were part of the annual Department of Homeland Security funding bill and a Democratic-controlled chamber refused to pass it, the result would be a shutdown of DHS—but the confrontation would not end there.

Trump has made it clear that, if necessary, he would use the U.S. military to assist with any mass-deportation program. If, in the event of a DHS funding shutdown, he and congressional Republicans were to bring up the annual Department of Defense appropriations bill with funding and direction to DoD to assist in the mass deportation effort, such a move would force Democrats to decide whether stopping Trump’s mass deportation plan was worth the political firestorm that would come from not funding the American military.

Alternatively, if Trump regains the White House and the GOP controls Congress in 2025, Trump could receive all the resources that he needs to carry out his plan. Even if Congress shuts him down, Trump will likely just try to redirect military appropriations for immigration purposes as he did with funding for his “wall” in 2019.

If that happens, opponents of such a program might well find themselves out of viable options to stop what would quickly become one of the darkest chapters of American history.