DAPA died at the U.S. Supreme Court, but the deadly shot came from Texas.

The Deferred Action for Parents of Americans and Lawful Permanent Residents program, announced by President Barack Obama's administration in 2014, was a sweeping executive action that would have protected about 4 million undocumented immigrants from deportation. But that program never went into effect — 26 states, with Texas at the helm, successfully sued to block it.

Now, Texas has mounted a similar effort in hopes that strategy works again: a long-promised lawsuit to challenge Deferred Action for Childhood Arrivals — an older, narrower Obama-era initiative that President Donald Trump has promised to end. History and legal precedent seem to favor Texas.

At a news conference announcing the suit last week, Texas Attorney General Ken Paxton invoked the state’s prior victory as a harbinger of success to come.

“The courts blocked DAPA after I led another state coalition challenging its constitutionality all the way to the U.S. Supreme Court,” Paxton said. “Our coalition is confident that ultimately, through our federal lawsuit, DACA will meet the same fate.”

DACA and DAPA are built on the same legal framework, but they vary widely in scope. DACA, announced in 2012, covers young adults brought to the United States as minors; many DACA recipients remember no other home country. DAPA would have granted a much bigger group — the undocumented parents of legal residents — the same legal work permits and protection from deportation.

Trump promised in September that he’d put an end to DACA, saying Congress needed to pass legislation if it wanted to protect the status of child immigrants. But a trio of federal court rulings have so far stymied his efforts. Though Texas’ lawsuit challenges the federal government, if it succeeds, it would bring the president the outcome he’s said he wants.

With its eyes on that win, Texas has taken up the same legal arguments it successfully used last time. Texas and its allies again claim that Obama didn’t have the power to enact DACA but used an executive action to create a program they say could be enacted lawfully only by Congress. And the suit against DACA appears poised to follow DAPA’s three-stop path through the federal courts, going first to a district court that ruled against DAPA, then to an appellate court that also ruled against DAPA, and finally reaching resolution at the U.S. Supreme Court, which last time dead-locked in a 4-4 tie that left Texas’ DAPA win in place.

The judges on those courts are mostly the same, save for one newcomer at the U.S. Supreme Court who, experts say, is likely to be sympathetic to Texas’ argument.

Still, the circumstances are different. DAPA would have included an estimated 4 million immigrants, while DACA covers several hundred thousand. And DAPA was controversial from the start, whereas DACA “Dreamers” have by now won the favor of much of the country. Nearly 60 percent of Texans support it, according to an October University of Texas/Texas Tribune poll. And even U.S. Sen. John Cornyn, a former Texas attorney general and one of the most powerful Republicans in Congress, has said the lawsuit is “not a solution.”

DACA has also won three favorable rulings from federal judges, though one federal judge has defended Trump’s authority to end it. In 2014, when Texas sued over DAPA, it had more more wind at its back — 25 states joined Texas in the suit. This time, only seven are in the coalition.

And, perhaps most importantly, the DACA “Dreamers” are not hypothetical the way DAPA recipients were: There are several hundred thousand DACA recipients living and working in the United States and more than 120,000 in Texas alone. They are individuals whose stories the country has heard and whose lives would be upended if their status were wrenched away. Judges may look at the DACA lawsuit differently than they did the DAPA case because this latest challenge comes so long after the program started. DAPA was blocked before it ever went into effect.

“The law does not favor people who have sat on their hands and allowed things to move forward and then come to court later to complain,” said Nina Perales, a lawyer for the Mexican American Legal Defense and Educational Fund who worked on the DAPA case.

Still, Texas has the past on its side, and it no longer has its strongest opponent in the White House. Some have speculated that the Trump administration coordinated with Texas to kill DACA in court. Many experts doubt the administration will fight the case very hard, so Texas’ true adversaries are likely to be intervening liberal groups like MALDEF. (Perales declined to comment on potential future litigation).

It’s not yet clear how those political and legal factors will collide. But at least for the case’s first two stages — in district court in Texas, and then at the 5th U.S. Circuit Court of Appeals — it’s poised to follow the path that started in 2014. The Texas coalition has asked for a hearing well before July 23, meaning movement on the case is likely earlier this summer.

“Frankly, DACA is an even more sympathetic policy, but, I think, on even shakier legal ground,” said Ilya Shapiro, a lawyer with the libertarian Cato Institute.

“The same play performed on a new stage”

The DACA lawsuit’s first stop will be at Texas’ southernmost tip, in federal court in Brownsville. There are two federal judges there: Obama-appointee Rolando Olvera and Andrew Hanen, a George W. Bush appointee called “one of the most viciously anti-immigrant judges in the country” by the liberal website ThinkProgress and “favorable” by the conservative Washington Times. The case originally fell to Olvera, but he signed it over to Hanen the same day, likely because Hanen had already handled a similar case — the DAPA lawsuit.

Hanen was the first federal judge to block DAPA in Texas’ lawsuit back in 2015. He wasn’t ruling on a full DACA challenge then, but he might as well have been. In a 123-page opinion, Hanen mentions the narrower immigration program more than 150 times. Ultimately, he blocked DAPA because, he wrote, it was illegally implemented — the federal government hadn’t given enough time for public comment. He also wrote that DAPA and DACA were “instituted in the same fashion.”

Hanen, experts and political observers said, is highly likely to side with Texas — especially since one of the hairier issues, the question of whether Texas has standing to sue in the first place, will almost certainly be resolved this time in the same way.

“There was an enormous amount of work in procedural terms that Texas and the other states had to do the first time around to get open the courthouse door — jurisdictional questions, standing questions,” said Michael Hethmon, a lawyer with the conservative Immigration Reform Law Institute, which filed a brief siding with Texas in the DAPA case. “That problem was solved the last time around.”

The next front will be the 5th Circuit, the federal court that hears cases from Texas, Louisiana and Mississippi and “the nation’s most politically conservative court of appeals,” according to Stephen Legomsky, who was chief counsel for U.S. Citizenship and Immigration Services in 2012 when DACA was announced.

The 5th Circuit ruled against DAPA in 2015, too, expanding Hanen’s arguments even further.

In the years since that court ruled against DAPA, it has only become more conservative, its ranks swelling with more Republican appointees. Andrew Oldham, who himself led Texas’ charge against DAPA as a staffer in the Texas Attorney General’s Office, is currently awaiting confirmation to the court. Three former staffers from that office have already been confirmed to the 5th Circuit.

Should the 5th Circuit rule for Texas, it would set up conflicting court orders — what’s called a “circuit split,” a conflict to be resolved by the U.S. Supreme Court.

That’s Texas’ aim, experts agreed.

“I think that Texas and the other states want to eliminate the DACA initiative, but I think they’re also trying to derail the other cases that are going on right now that have so far preserved or extended DACA,” Perales said. “Texas is trying to set up a situation where there is a contrary decision, and then I think ultimately these questions are going to have to be decided by the U.S. Supreme Court.”

And only one player has changed on the Supreme Court since it took up DAPA: Neil Gorsuch, who hadn’t been appointed to the court yet when it deadlocked in a 4-4 tie that left the DAPA block in place.

Gorsuch — who has time and again shown concern about the expanding power of the executive branch — “would be one of the five to side with Texas,” Hethmon said without hesitation.

There’s still a ways to go before the case gets to that point — the makeup of the Supreme Court could shift, or Congress could resolve the question itself. And DACA is being litigated in federal courts across the country, rulings that are likely to conflict and collide.

Still, perhaps the best model for predicting how Texas' lawsuit will play out from the state outward is how a near-identical lawsuit played out last time. The state’s path is well-trod.

Judge Hanen wrote in his 2015 opinion that the impact of DAPA would be like DACA’s all over again; now, that order has flipped.

“It is like watching the same play performed on a new stage,” he wrote.

Disclosure: The University of Texas at Austin has been a financial supporter of The Texas Tribune, a nonprofit, nonpartisan news organization that is funded in part by donations from members, foundations and corporate sponsors. Financial supporters play no role in the Tribune's journalism. Find a complete list of them here.