The US Supreme Court ruled on Wednesday that Tehran must pay nearly $2bn in frozen assets to victims and relatives of those killed in attacks the US has blamed on Iran.

In a 6-2 ruling, the court upheld a 2012 federal law over the distribution of Iranian bank assets, finding that the US Congress had not usurped the authority of lower courts in passing the legislation.

More than 1,000 Americans are affected by the decision, which relates to the 1983 bombing of Marine barracks in Lebanon, in which 241 US Marines were killed, and other attacks.

Justice Ruth Bader Ginsburg wrote the opinion for the court, which rejected efforts by Iran's central bank to stop the claim.

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 US are turned over to the families.

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

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 ruled for the victims. But Iran has refused to comply with the judgments, leading lawyers to hunt for Iranian assets in the United States.

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