With the battle over Saudi Arabia’s role in 9/11 looming in the background, the Supreme Court today made it easier for victims of Iran-sponsored terror to recover assets from the Islamic Republic’s central bank.

The laws at stake—one proposed and one passed in 2012—are not legislatively related. But in light of the current debate, the Court’s 6-2 opinion today in Bank Markazi v. Peterson takes on additional significance.

The “Iran Threat Reduction and Syria Human Rights Act of 2012” is a highly unusual law. It was passed after the families of over 1,000 victims of Iranian-sponsored terrorism filed lawsuits, beginning in 2008, under a set of laws enabling such suits. In particular, various laws made available any assets that had been frozen pursuant to economic sanctions, such as those formerly in place against Iran.

When the claimants filed, however, it was unclear whether $1.75 billion assets held by the Iran’s Bank Markazi, and the subject of a dispute dating back to 2008, were reachable or not. In 2012, Congress passed the Iran bill to specifically state that they were.

Unsurprisingly, after the bill became law, lower courts allowed the claimants to file claims against those assets and the bank appealed.

To adjudicate the dispute, the Supreme Court had to haul out clauses of the Constitution that most lawyers last read in law school. By singling out these specific assets, is the law a “Bill of Attainder?” By changing the posture of pending litigation, does it violate the “Ex Post Facto” Clause? And most importantly, does it violate the separation of powers for Congress to basically tell courts how to decide a point of law?

Not surprisingly, the Court’s opinion cited cases from 1792, 1872, and even Marbury vs. Madison (1803), the foundation of judicial review itself. And at the end of the day, it allowed the law to stand.

Chief Justice Roberts’s dissent, joined by Justice Sotomayor, explains why this might be seen as odd. Imagine, the Chief Justice wrote, that in the middle of a property dispute, the town board changes the rules of how property disputes should be decided—and limits the change to cases just like yours. This might seem unfair, because even if it’s not an ex post facto law or bill of attainder (the Court didn’t seriously take up these concerns), it seems like the town legislature is pre-empting the judiciary.

Confounding the Court’s usual ideological split, Justice Ginsberg wrote the opinion for the Court (joined by Justices Alito, Thomas, Kennedy, Breyer, and Kagan). She refused to apply an 1872 case restricting laws that affect pending legislation (interestingly, that case was about seizing the property of a former Confederate who had been pardoned by President Lincoln). She denied that that the Iran law applies only to one case; after all, there are 16 pending actions, more than 1,000 plaintiffs, and more could be added at any time.

Most importantly, she wrote that “a statute does not impinge on judicial power when it directs courts to apply a new legal standard to undisputed facts.” In sum, Justice Ginsberg wrote, the Iran law “provides a new standard clarifying that, if Iran owns certain assets, the victims of Iran-sponsored terrorist attacks will be permitted to execute against those assets. Applying laws implementing Congress’ policy judgments… is commonplace for the Judiciary.”

In short, it may seem that the Iran law changes the rules in the middle of the game, but Congress can do that if it wants. To extend the analogy, problems would only arise if Congress told the dealer how to apply the rules to a specific hand, or told the dealer which player should win.

It’s hard to separate the holding in this case from its overall context. Justice Ginsberg explicitly emphasized that the law was about foreign policy, typically the purview of the executive and legislative branches rather than the judiciary. But more broadly, the apparent unfairness of the Iran law seems justified, in the Court’s eyes, by the government’s effort to reach these Iranian assets and compensate victims of terror.

Yet the government has now changed its policy on Iranian-held assets; it’s not even clear that the $1.75 billion at issue here is still frozen thanks to the Iran nuclear deal, or whether the assets have been thawed by the easing of sanctions.

And, of course, members of Congress—over strenuous objections from the White House, the Pentagon, the national security establishment, and even former U.S. Ambassador to the United Nations John Bolton—are considering a bill that would allow civil lawsuits against the government of Saudi Arabia for its alleged role in 9/11.

While the law the Court reviewed is only about Iran, it does give a sense of what could be in store for Saudi Arabia, if the new bill becomes law.

Indeed, it might also cast a different light on Saudi Arabia’s threat to sell $750 billion in U.S. assets if the law goes through. So far, that threat has been depicted by media observers as a negotiating position. But in light of today’s court decision, it might be better understood as self-preservation. Those assets would likely be reachable by claimants in a future lawsuit, and liquidating them first would be a way to protect them from exposure.

In a sense, Bank Markazi is a case about separation of powers. But it is also a case about war—specifically, the “war on terror” and the difficulty of holding anyone accountable for acts of murder and violence. Perhaps that explains the Court’s rather tortured reasoning, and its extreme deference to congressional action. As rules of a game, the Iran law may seem unfair, but it is actually part of the rules of war.