A court in Tehran on Saturday ordered the US government to pay $330 million in damages for "planning a coup" against the newly established Islamic Republic in 1980, AFP reported.

A year after the 1979 Islamic revolution that toppled the US-backed shah, a group of mostly army officers tried to overthrow the new government.

State news agency IRNA said the "insurgents" were led by Saeed Mahdiyoun, a former Iranian air force commander, and had their headquarters in Nojeh, an air base in the western Hamedan province.

Several people were killed in clashes between the coup plotters and government forces, and scores of others were arrested.

"Their objective was to seize control of military bases across the country and target strategic centers and residences of the revolution’s leaders. However, their efforts were thwarted," IRNA said.

Last year, relatives of those killed in the coup filed a legal petition with Iran's International Court demanding damages, the judiciary's Mizan Online website said.

They specifically accused the United States of "planning and executing" the coup, the website added.

The court ruled in their favor, ordering "the American government to pay the plaintiffs 30 million dollars in material and moral damages, and 300 million dollars in punitive damages," it added.

In 2016, the US Supreme Court ordered that Iranian assets frozen in the United States should be paid to victims of attacks which have been blamed on Tehran, including the 1983 bombing of a US Marine barracks in Beirut and a 1996 blast in Saudi Arabia.

Iran later sued the US over the frozen funds. Earlier this year, the International Court of Justice ruled that Washington's freezing of funds belonging to several Iranian individuals and companies was "manifestly unreasonable".

At the same time, it ruled it had no jurisdiction to unblock nearly $2 billion in Iranian central bank assets frozen by the United States.

The ruling on Saturday follows a tentative agreement recently reached between the US and Iran, that would see the release of five detained Americans and an unknown number of Iran prisoners in the US.

White House National Security spokesperson John Kirby later offered caution about the deal, saying that “the deal is not done” and that active discussions on how to bring home the five Americans are taking place.

Iranian Foreign Minister Hossein Amir-Abdollahian, meanwhile, rejected any link between the prisoner swap with the United States and the recent release of the country's frozen assets abroad.