Washington CNN —  

The Supreme Court ruled Wednesday in favor of victims of terrorism and their families in a 6-2 split, clearing the way for them to collect nearly $2 billion from the central bank of Iran.

The court decided Congress had not exceeded its authority when it passed a law aimed specifically at securing such restitution.

“(The 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,” Justice Ruth Bader Ginsburg, writing the majority. “Applying laws implementing Congress’ policy judgments, with fidelity to those judgments, is commonplace for the Judiciary.”

The ruling comes at a sensitive time of U.S.-Iran relations, and as Congress considers controversial legislation that would allow families of 9/11 victims to sue Saudi Arabia.

Chief Justice John Roberts, joined by odd bed fellow Justice Sonia Sotomayor, dissented from the majority opinion, saying Congress had interfered with the role of the judiciary in passing the law while the case was pending in the courts.

“No less than if it had passed a law saying ‘respondents win,’ Congress has decided this case by enacting a bespoke statute tailored to this case that resolves the parties’ specific legal disputes to guarantee respondents’ victory,” he said.

Roberts said the law “violates the bedrock rule” that the “judicial power is vested in the judicial branch alone.”

READ: Supreme Court divided on Obama’s immigration actions

The lead plaintiff was Deborah Peterson, whose brother, Lance Cpl. James C. Knipple of Alexandria, Virginia, was killed in the Beirut barracks bombing in 1983.

In 2001, the Peterson plaintiffs, along with family members and the estates of 241 Beirut bombing victims, filed suit in U.S. courts against Iran. Six years later, a federal district court held that the evidence presented by the Peterson plaintiffs established Iran’s liability, and the following year, the plaintiffs were informed that the Bank of Markazi had $1.75 billion in assets held in an account in New York.

“Today’s ruling is a major victory not just for the plaintiffs in their quest to hold the Iranian government responsible for acts of terrorism, but for Congress in its ability to change the rules of pending lawsuits even as they’re unfolding,” said Steve Vladeck, professor of law at American University Washington College of Law and CNN legal analyst.

While the plaintiffs sought access to the funds held by the Bank of Markazi, Congress passed the Iran Threat Reduction and Syria Human Rights Act of 2012 including one section that addressed the assets in the Peterson case. In 2013, a district court subsequently ordered the bank to turn over the assets.

Lawyers for the Bank argued that Congress exceeded its authority when it passed the law because it effectively dictated the outcome of a single pending case without changing the law in general.

In court briefs, Peterson lawyers rejected the bank’s arguments.

“Nothing in the Constitution bars Congress either from modifying the applicable law before the Judicial Department has rendered a final decision, or from modifying the terms on which that judgment may be enforced,” they wrote.

Roberts, who cares about the institution of the court perhaps more than any other justice wrote, “I readily concede, without embarrassment, that it can sometimes be difficult to draw the line between legislative and judicial power. ”

He said, however, “the entire constitutional enterprise depends on there being such a line.”

“Hereafter, with this court’s seal of approval, Congress can unabashedly pick the winners and losers in particular pending cases,” he wrote.

The case was carefully watched by those who worked to help pass the 2012 law.

“From a public policy perspective, the Iranian government needs to be punished for its support of past acts of terrorism, ” said Mark Dubowitz, the executive director of the Foundation for Defense of Democracies, a group that filed a brief in support of Peterson.

“Governments need to know that if they are going to conduct terrorist activities, they will pay for that terrorism through the imposition of billions of dollars in judgments and in penalties,” he said.

Ted Olson, the lawyer defending the victims, said the ruling “will bring long-overdue relief to more than 1,000 victims of Iranian terrorism and their families, many of whom have waited decades for redress.”

“We are gratified that the court agreed that the law Congress enacted to provide relief to victims of terrorism complies with the Constitution,” he said.