The path to improved British-Iranian relations has hit a new barrier after the high court in London ruled that the UK does not have to pay at least £20m interest on the £387m it owes to Iran over the cancelled sale of Chieftain tanks in the 1970s.

The debt was seen by Boris Johnson when he was foreign secretary as critical to the release of Nazanin Zaghari-Ratcliffe, the Iranian-British dual national imprisoned in Tehran.

A ruling by Mr Justice Phillips this week said the UK did not owe interest accumulated over 10 years on the sum it acknowledges it owes to Iran. The issue of whether there is an Iranian body to which the UK can lawfully pay the £387m remains to be determined.

In February 2018 after meeting Zaghari-Ratcliffe’s husband, Richard Ratcliffe, Johnson’s team briefed to the Sun that the owed money would be handed over to Iran, but disagreements in Whitehall meant it did not happen.

Play Video 6:21 Richard Ratcliffe's determined fight to free wife Nazanin from an Iranian jail – video

Iran’s foreign minister, Javad Zarif, is understood to have been so furious about the non-payment of the money and what he regarded as Foreign Office double dealing that it is claimed he washed his hands of the Zaghari-Ratcliffe case.

Zaghari-Ratcliffe’s supporters say the briefing to the Sun was more damaging to her chances of release than Johnson’s better-known mistake when he said she had been training journalists at the time of her arrest in Tehran. Her family say she was there on holiday.

Supporters including her MP, Tulip Siddiq, have raised questions about the scale of the legal fees the UK is racking up in the debt dispute.

The Ministry of Defence has supplied answers to Siddiq suggesting that the legal costs over 40 years were between £32m and £41m. Ministers argue that sanctions against Iran have to be respected whatever the diplomatic gains from handing over the money.

The latest court case was about whether the MoD should pay interest on the debt accumulated in the period after the Iranian body to which the money is owed became subject to EU sanctions. The Sunday Times successfully applied for a secrecy order on the case to be lifted.

The initial dispute centred on a 1970s defence deal between the Iranian defence ministry and International Military Services (IMS), a venture wholly owned by the MoD. IMS agreed a deal in 1971 to sell the shah of Iran more than 1,500 Chieftain tanks and armoured vehicles. The contracts were cancelled in February 1979 after the shah was deposed in a revolution. Iran had already paid for the undelivered tanks and demanded its money back.