Israel will have to pay Iran more than $1 billion for oil shipments it received during the time of the shah, Switzerland’s highest court has ruled.

The arbitration order, which effectively ends Israel’s appeals on the 37-year legal tussle, relates to oil pumped into Israel from Iran before 1979, when the shah was deposed in the Islamic revolution.

The one-time allies had earlier developed a pipeline for Persian crude to travel from Eilat to Ashkelon and up the Israeli coast to Europe, bypassing the Suez Canal, which was beset by political volatility and Arab nationalism.

In 1989, the national Iranian oil company began seeking $1.2 billion for oil shipments Israel took in the months leading up to the revolution, but Israel has always argued that it cannot pay the debt because Iran is “an enemy state”.

But the Federal Tribunal, at Switzerland’s Supreme Court, has now ruled that the Israeli-owned Eilat Ashkelon Pipeline Company (EAPC) must pay the full amount owing, plus legal costs totalling $460,000.

According to Global Arbitration Review, which published the Swiss court’s ruling, the removal of sanctions on Iran’s oil company means there is now no legal reason not to pay the money back.

The ruling relates to the Trans-Asiatic Oil Company (TAO), an Israeli firm registered in Panama, and the National Iranian Oil Company, and follows a lower Swiss court order that Israel pay the full amount in May last year.

Israel’s military censor has restricted Israeli media from reporting on the story or the company, including its earnings. It says the secrecy order is in place for “national security reasons” but does not specify what these are.

The pipeline took oil from the Red Sea to the Mediterranean coast where Israeli tankers transferred it to Europe. Israel took 50 deliveries in the run-up to the revolution, before diplomatic relations were broken.

Alongside Iranian efforts to get Israel to pay for the crude it took on credit, Tehran has sought half the value of the partnership, which was a joint set-up. The total is estimated to be about $7 billion.

An Israeli government spokesman declined to comment on the lost appeal.