The Court of Appeal has ruled that the ‘core’ of the trial of two terrorist suspects can be heard in secret, but has revealed the names of the defendants.

The judges also ruled that parts of the trial, including swearing in of the jury, reading of the charges, part of the prosecution opening and the verdict can be heard in public.

Lord Justice Gross said the court had ‘grave concerns’ about the cumulative effect of anonymising defendants and holding trials in private, but said this is an ‘exceptional’ case.

The defendant previously known as AB is Erol Incedal and the defendant known as CD is Mounir Rarmoul-Bouhadjar. The pair are charged with possessing bomb-making instructions and Incedal is also charged with preparing acts of terrorism.

The court decided that a small number of journalists will be allowed to attend the trial but not to publish any details until after its conclusion.

Gross said: ‘We are persuaded on the evidence before us that there is a significant risk – at the very least, a serious possibility – that the administration of justice would be frustrated were the trial to be conducted in open court.

'Open justice must... give way to the yet more fundamental principle that the paramount object of the court is to do justice.'

In May, a Crown court judge accepted the Crown Prosecution Service’s application that it was in the interests of national security for the trial to be heard in secret. The CPS told the Court of Appeal that it could abandon the prosecution if the trial had to be held in public.

Desmond Hudson, chief executive of the Law Society, said a departure from the principle of open justice must be for the court, and not the government to decide.

He said: 'The Court of Appeal’s decision appears to have struck a sensible balance which will ensure that the most basic principles of open justice and the rule of law are retained – with the emphasis on “appears” because we only know what has been released to us. If national security interests require closed hearings restricting that to the bare minimum and relying on a fiercely independent judiciary may be the best compromise.'  

The trial starts at the Old Bailey on Monday.

The full judgment.