President Trump looks like he might be gearing up to touch the third rail of immigration policy in 2017: ending the Obama-era Deferred Action for Childhood Arrivals program, which allowed young unauthorized immigrants to work legally and protected them from deportation.

Axios reported Thursday night that Trump is “seriously considering” ending DACA, after months of refusing to make a decision about the future of the 780,000 immigrants it’s protected.

He’ll have to make a decision in the next few weeks. A group of state officials, led by Texas Attorney General Ken Paxton, is threatening to sue the administration to end DACA if Trump doesn’t pull the plug by September 5 — which could result in the program being put on hold in federal courts.

But politically and legislatively, ending DACA could open the floodgates.

The unauthorized immigrants it protects are politically sympathetic and well-connected — they’ve gone to school in the US, are fluent in English, and may not have even known they weren’t in the country legally before applying to college. Some polling finds Americans oppose ending the program by a two-to-one margin.

That may be why Trump has been reticent to kill DACA, even as he’s cracked down on immigration enforcement in his first months in office. In July, he told reporters he’s still wrestling with it: "It’s a decision that I make and it’s a decision that’s very, very hard to make.”

Trump’s own White House is divided — Attorney General Jeff Sessions (who would be in charge of defending DACA in court if the state officials’ lawsuit went forward) wants to kill it, while the Department of Homeland Security (which was, until recently, led by Trump Chief of Staff John Kelly) is reticent to get rid of the only remaining vestige of President Obama’s efforts to prioritize deportations so that long-resident unauthorized immigrants with no criminal records weren’t targeted.

But the threat of a lawsuit may have tipped the scales. And then all legislative hell could break loose.

Why DACA is suddenly in the crosshairs

The Trump administration has had several opportunities to end DACA — either by nullifying the existing protections for the 780,000 people who’ve already been approved under the program or by refusing to accept any new people or renew the two-year protections for existing DACA recipients when they expire.

It hadn’t taken any of them yet. Even when it formally killed an abortive 2014 program expanding deferred action, it explicitly made clear that it wasn’t killing the program that was already in effect.

This has been a sore spot for immigration hardliners, who understood Trump’s campaign promise to roll back President Obama’s “unconstitutional executive orders” as a promise to end DACA. (DACA’s constitutionality hasn’t been successfully challenged, but immigration hawks believe the president’s legal authority to protect immigrants from deportation in individual cases doesn’t extend to a program that allowed certain immigrants to apply en masse.)

In June, a group of 10 Republican state officials, led by Texas AG Paxton, took matters into their own hands. They wrote the administration a letter asking them to end the DACA program — and threatening to file a federal lawsuit over the program’s constitutionality if the administration failed to act.

That letter changed the calculus about whether to end DACA in two big ways. First of all, it shifted the focus from the Department of Homeland Security, which administers the program — and whose secretary, John Kelly, appears loath to go after DACA recipients — and toward the Department of Justice, which would have to defend DACA if the states took it to court.

That means, ultimately, it would come down to US Attorney General Jeff Sessions — a longtime immigration hardliner on legal and unauthorized immigration — as to whether, and how, to stand up for the program.

While Sessions’s relationship with Trump has been strained for much of his presidency, it’s clear he has a lot of influence on this issue. In July, then-Homeland Security Secretary Kelly told members of the Congressional Hispanic Caucus that the decision about DACA was entirely up to Sessions. And even if Trump decided to overrule his AG, it’s not clear how he could compel him to forcefully defend a program in court that Sessions wants to end.

It might not matter anyway. Here’s the other way the state AGs’ letter changed the calculus: If the administration doesn’t end DACA, and the states sue them over it, the program will likely be put on hold — at least temporarily — by a federal judge.

The challenge to DACA would be used to revive the suit against the 2014 deferred action program — which guarantees it would be heard by Southern District of Texas Judge Andrew Hanen. Republican state officials selected Hanen’s court when they challenged the 2014 deferred action program, and he hasn’t disappointed them — he’s clearly skeptical of the government’s actions to limit immigration enforcement. It’s not an ironclad guarantee that Hanen would rule against DACA, but it’s a pretty safe bet. And the fairly conservative Fifth Circuit Court of Appeals might agree.

Under those circumstances, the program would at least be on hold for months or even years. And not only would the administration’s hand have been forced, but it would look like a loss for Trump — yet another court defeat on immigration, this time from the other side.

It’s not hard to imagine that President Trump might want to avoid a public loss. If he’s convinced that DACA is going to end anyway, he may choose to do it himself — no matter how sympathetic he feels toward the DREAMers.

If DACA falls, it could start a chain reaction in Congress

The deadline given by the state attorneys general in their letter to the administration was September 5. That happens to be the day Congress is slated to return from its August recess.

Congress can’t stop the Trump administration from ending DACA, or Republican state governments from suing if it doesn’t. But if DACA does end, the pressure to act shifts to the legislative branch.

While immigration isn’t nearly as bipartisan an issue as it used to be — Democrats have overwhelmingly opposed efforts to ramp up enforcement, while few Republicans are still willing to come out in favor of legalization for unauthorized immigrants — there are still some Republican members of Congress who want to keep DACA recipients in the US. After the 2016 presidential election, members of both parties introduced a bill that would grant legal status to DACA recipients in case Trump ended the program; this spring, a group of Republican members of the House introduced their own legalization bill, called the “Recognizing America’s Children” (RAC) Act.

Those bills haven’t moved yet because there hasn’t yet been a threat to DACA. But if nearly 800,000 people are suddenly forced out of their jobs and faced with the threat of deportation at any time, supporters of legalization are likely to start pushing hard for Congress to take action.

The question is what they’ll accept in return.

Some conservatives, whether openly or behind closed doors, admit that they’re willing to accept a compromise that results in DACA recipients getting to stay in the US. (After all, they’re US-educated and fluent in English; for people worried about immigrants as threats to cultural integration, DACA recipients are not the most imminent risk.) But they want something in return: expanded immigration enforcement to target new arrivals and unauthorized immigrants living in the US, cuts to legal immigration in the future, or both.

The White House itself is reportedly envisioning a grand bargain: In return for allowing DACA recipients to become legal immigrants, they want future cuts to legal immigration (possibly in the form of the Trump-endorsed RAISE Act, which would cut legal immigration to the US in half over the next decade); mandatory verification of legal status for anyone hired for a job in the US; and expanded funding for border (including a wall) and interior enforcement.

Right now, Democrats aren’t willing to agree to any of this. They’re not even interested in giving the White House a few billion dollars to build a few dozen miles of border barriers — something Trump says he’s willing to shut down the government over if he doesn’t get it.

The question is whether Trump will hold the line if congressional Republicans decide they’re less interested in falling in line behind the president than they are in making a deal. And if they are, the question is what kind of deal they would accept. Several factions in Congress have been pushing narrower bills to deal with discrete aspects of immigration policy — but the White House’s desire to think bigger might be inspiring those factions to ask for more too.

The possibilities aren’t endless, but they’re close. Once Congress agrees to crack open the door on immigration, it’s going to be hard to keep it from opening all the way, into a free-for-all over immigration policy writ large. And if DACA ends, there’s going to be a lot of pressure on Congress to open that door for the sake of nearly 800,000 American-raised DREAMers.

House Speaker Paul Ryan (and, to a lesser extent, Senate Majority Leader Mitch McConnell) really doesn’t want this fight. It would expose the fissures in his party between traditional pro-business conservatives who have been open to some form of legalization — like Ryan himself — and the hardline populists who rose to power over the past few years and are currently sitting in the White House. It would bog down the congressional agenda at a time when Congress is already worried about getting everything done.

And it certainly looks like Trump himself doesn’t want this fight. He told reporters Thursday that he wants a “comprehensive” solution on immigration (though it’s not clear what “comprehensive” means to Donald Trump) but that the politics “aren’t ready.”

If they’re not ready now, they won’t be ready in September. But thanks to state officials from Trump and Ryan’s own party, that fight might be coming, ready or not.