The U.S. Supreme Court on Wednesday ruled 6-2 in favor of relatives of the 241 Marines who died in a 1983 terrorist attack in Beirut and other attacks that courts have linked to Iran. (Karen Bleier/AFP/Getty Images (Karen Bleier/AFP/Getty Images)

The Supreme Court on Wednesday cleared the way for American victims of terrorism to collect nearly $2 billion in seized Iranian assets, but not without a warning from Chief Justice John G. Roberts Jr. that the court was undermining its authority.

The justices ruled 6 to 2 that Congress had not violated the separation of powers when it passed a bill making it easier for about 1,300 people to collect money on behalf of those killed or injured in the 1983 bombing of a U.S. Marine Corps barracks in Beirut and other attacks blamed on Iran.

The ruling upheld a 2014 appeals court decision awarding the money to the families.

Justice Ruth Bader Ginsburg, writing for the majority, said Congress had the power to pass such a law even if its intention was to influence the resolution of decades-long litigation in which the families sought compensation from Iran.

“Congress, our decisions make clear, may amend the law and make the change applicable to pending cases, even when the amendment is outcome determinative,” Ginsburg wrote, adding that presented “no threat to the independence of the judiciary.”

Those who favor the ability of victims of state-sponsored terrorism to use the court for redress said the decision was an important one.

University of Notre Dame law professor Jimmy Gurulé, a former prosecutor who filed an amicus brief on behalf of the families, said the decision “sends a powerful message to rogue states and state sponsors of terrorism that if you, directly or indirectly, provide material support for terrorism, you will be held accountable.”

The ruling capped a legal battle that began in 2003 when a coalition of families sued the government of Iran. Among the plaintiffs was Deborah Peterson of Fairfax, Va., who was seeking to avenge the killing of her brother, 20-year-old Marine Cpl. James Knipple. Knipple was at the barracks on the day of the attack as part of an American peacekeeping mission.

On Wednesday — after spending more than 30 years dedicating efforts to her brother’s memory, and about half that time fighting this battle in the courts — Peterson said she hadn’t quite internalized the Supreme Court’s decision.

“I don’t think you ever really have closure,” Peterson said. “I’ll always be sad that Jim didn’t have a whole life, a full life.”

Still, there is some solace to be found, she said, that “in the eyes of the law, we know who is responsible, and those who are responsible have been brought to the justice that we are capable of bringing them to here on earth.”

Matthew D. McGill, one of the lawyers who represented the families at the Supreme Court, said the decision “removes the last remaining legal impediment to the distribution of these funds to the victims of Iran’s acts of terrorism.

“We will promptly ask the district court supervising the funds to carry out the Supreme Court’s decision and authorize distribution of the funds to the victims, some of whom have waited almost 33 years for justice.”

Citizens are generally barred from suing foreign governments in U.S. courts, but there is an exception for terrorist acts. Family members of the deceased and those injured went to court and showed, for instance, that the October 1983 bombing that killed 241 sleeping service members in a Beirut barracks was conducted by the Lebanese Shiite militia Hezbollah, which is backed by Iran.

Iran never responded to the suit.

Survivors of 173 of those killed in the Beirut attack and other acts of terrorism secured judgments against Iran, and courts ruled they were entitled to more than $10 billion in compensation. After President Obama froze Iranian assets in the United States in 2012, the plaintiffs targeted nearly $2 billion in Iranian-owned bonds held in a New York bank.

Meanwhile, the families lobbied Congress to pass a law saying, essentially, that the victims were entitled to the funds. Bank Markazi, Iran’s central bank, challenged the law, as well as a 2014 ruling by the New York-based U.S. Court of Appeals for the 2nd Circuit that the money should be awarded to the victims.

Bank Markazi said legislation that directs the winner of a lawsuit violates the separation of powers and usurps judicial authority.

But Ginsburg, joined by Justices Anthony M. Kennedy, Clarence Thomas, Stephen G. Breyer, Samuel A. Alito Jr. and Elena Kagan, disagreed.

“A statute does not impinge on judicial power when it directs courts to apply a new legal standard to undisputed facts,” Ginsburg wrote, saying Congress has passed such specific legislation in the past.

She said the subject matter was important, as well. The law “is an exercise of congressional authority regarding foreign affairs, a domain in which the controlling role of the political branches is both necessary and proper,” Ginsburg wrote.

“Congress acted comfortably within” its authority over foreign sovereign immunity and foreign-state assets, she wrote.

Roberts strenuously objected, however, and was joined in his dissent by liberal Justice Sonia Sotomayor.

“Article III of the Constitution commits the power to decide cases to the judiciary alone,” Roberts wrote. “Yet in this case, Congress arrogated that power to itself.”

At issue, the chief justice said, “is a basic principle, not a technical rule.” An act of Congress had decided the case “no less certainly than if Congress had directed entry of judgment for respondents,” he wrote.

“Hereafter, with this court’s approval, Congress can unabashedly pick the winners and losers in particular pending cases. Today’s decision will indeed become a blueprint for extensive expansion of the legislative power at the judiciary’s expense,” Roberts wrote.

The case is Bank Markazi v. Peterson.

Karoun Demirjian contributed to this report.