The Supreme Court on Wednesday upheld a judgment allowing families of victims of the 1983 Marine barracks bombing in Beirut and other terrorist attacks to collect nearly $2 billion in frozen Iranian funds.

The court on Wednesday ruled 6-2 in favor of more than 1,300 relatives of the 241 U.S. service members who died in the Beirut bombing and victims of other attacks that courts have linked to Iran.

Justice Ruth Bader Ginsburg wrote the opinion for the court rejecting efforts by Iran's central bank to try to stave off court orders that would allow the relatives to be paid for their losses. The money is sitting in a federal court trust account.

Iran's Bank Markazi complained that Congress was intruding into the business of federal courts when it passed a 2012 law that specifically directs that the banks' assets in the United States be turned over to the families. President Barack Obama issued an executive order earlier in 2012 freezing the Iranian central bank's assets in the United States.

The law, Ginsburg wrote, "does not transgress restraints placed on Congress and the president by the Constitution."

Chief Justice John Roberts and Justice Sonia Sotomayor dissented. "The authority of the political branches is sufficient; they have no need to seize ours," Roberts wrote.

The decision comes as controversy swirls over pending legislation in Congress that would allow families of the Sept. 11 attacks to hold the government of Saudi Arabia liable in U.S. court. The Obama administration opposes the bill. President Barack Obama met with King Salman in Riyadh Wednesday at the start of a brief trip to the country.

Congress has repeatedly changed the law in the past 20 years to make it easier for victims to sue over state-sponsored terrorism; federal courts have awarded the victims billions of dollars. But Iran has refused to comply with the judgments, leading lawyers to hunt for Iranian assets in the United States.

The Supreme Court case involved $1.75 billion in bonds, plus accumulating interest, owned by the Iranian bank and held by Citibank in New York.

The plaintiffs in the lawsuit included relatives of the victims of the Marine barracks bombing in Beirut, the 1996 terrorist bombing of the Khobar Towers in Saudi Arabia which killed 19 service members, and other attacks that were carried out by groups with links to Iran. The lead plaintiff is Deborah Peterson, whose brother, Lance Cpl. James C. Knipple, was killed in Beirut.

"We are extremely pleased with the Supreme Court's decision, which 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," said Theodore Olson, the former Bush administration Justice Department official who argued on behalf of the families at the Supreme Court.

Liberal Democrats and conservative Republicans in Congress, as well as the Obama administration, supported the families in the case.

The case is Bank Markazi v. Peterson, 14-770.