Treasury ordered to lift sanctions against Bank Mellat, as critics warn open justice and rule of law are casualties of secret courts

The government's enthusiasm for secret courts has suffered a setback after the UK's most senior judges quashed an anti-terrorist sanction imposed on an Iranian bank and dismissed the intelligence involved as irrelevant.

In two related judgments, the supreme court ordered the Treasury to remove sanctions against Bank Mellat and said that, in future, appeal courts should go into closed session "only where it has been convincingly demonstrated to be genuinely necessary in the interests of justice".

The UK Treasury alleges that the Tehran-based bank financed firms involved in Iran's nuclear programme. Since 2009, the bank has been fighting to have the sanctions lifted.

In order to justify the allegations, the Treasury asked the supreme court to go into a secret session for the first time this spring.

In the first judgment, read out by Lord Neuberger, the president of the supreme court, the justices said: "Having held a closed hearing, it turned out that there had been no point in the supreme court seeing the closed judgment [which related to the secret intelligence], because there was nothing in it which could have affected [our] reasoning in relation to the substantive appeal.

"A [closed hearing] should be resorted to only where it has been convincingly demonstrated to be genuinely necessary in the interests of justice. If the court strongly suspects that nothing in the closed material is likely to affect the outcome of the appeal, it should not order a closed hearing.

"Appellate courts should be robust about acceding to applications to go into closed session or even to look at closed material."

Lord Sumption, delivering the second related judgment, said targeting Bank Mellat alone was irrational and disproportionate. "The bank is entitled to succeed [in its appeal] on the ground that it received no notice of the Treasury's intention to make the direction, and therefore had no opportunity to make representations.

"The duty to give advance notice and an opportunity to be heard to a person against whom a draconian statutory power is to be exercised is one of the oldest principles of what would now be called public law."

Sarosh Zaiwalla, of Zaiwalla & Co Solicitors, who represented Bank Mellat, said: "Today's ruling is a victory for the rule of law as much as it is for Bank Mellat. The judgment will put enormous confidence in the independence of the British judiciary and sets an example that even controversial disputes can be resolved by applying the principle of rule of law through the British courts."

Bank Mellat has always denied supporting Iran's nuclear programme.

Liberty intervened in the case. Corinna Ferguson, legal officer for the human rights group, said: "Proud principles of open justice and the rule of law are the casualties as the secret justice disease infects the highest court in the land. Today's chilling judgment brutally exposes the government's claims and lays bare its willingness to overstate the importance of secrecy to serve its own ends.

"Given recent revelations of spying and snooping it really does seem that it's one rule for the state, another for everyone else – no scrutiny for them; no privacy for us."

Cori Crider, of the human rights group Reprieve, said: "If the government was prepared to fib about how necessary these secret courts are in a financial case, the risk is tenfold worse when the case involves UK involvement in kidnap and torture … This is a powerful cautionary tale for any court asked to judge torture cases behind closed doors."

A Treasury spokesperson said: "This judgment refers to a 2009 order which is no longer in use. It does not affect the way in which we currently apply financial restrictions to Iran.

"As set out in the judgment, the Treasury maintains the power to make future orders under schedule 7 to the Counter-Terrorism Act 2008. Sanctions will remain in place until Iran engages in meaningful talks on its nuclear programme.

"We are disappointed that the court of appeal's decision in favour of HM Treasury was overturned and are considering the judgment and its implications for any future orders."

Bank Mellat's assets remain frozen pending an appeal in the European courts.

• This article was amended on 20 June 2013 to change references to "Iran's nuclear weapons programme" to "Iran's nuclear programme".