THE UK Government is being ordered to release protected documents by judges hearing an appeal against the conviction of the late Abdelbaset al-Megrahi for the Lockerbie bombing.

Foreign Secretary Dominic Raab has said producing the documents, which are covered by a public immunity certificate, would cause "harm to the United Kingdom Government's international relations" and "real harm to the national security of the United Kingdom".

However appeal court judges said they will order the two protectively marked documents (PMDs) to be produced to the court and will hold a hearing to consider the matter before deciding whether they should be disclosed and form part of the grounds of appeal.

An appeal against Megrahi's conviction was lodged after the Scottish Criminal Cases Review Commission (SCCRC) referred the case to the High Court in March, ruling a possible miscarriage of justice may have occurred.

The bombing of Pan Am flight 103, travelling from London to New York on December 21 1988, killed 270 people in the UK's worst terrorist atrocity.

Former Libyan intelligence officer Megrahi – found guilty in 2001 of mass murder and jailed for life with a minimum term of 27 years – was the only person convicted.

Judges have now granted Megrahi's son Ali Al-Megrahi permission to proceed with the appeal.

READ MORE: Lockerbie Bombing: The long road to the new appeal

A virtual hearing took place in August before the Lord President Lord Carloway, Lord Justice Clerk Lady Dorrian and Lord Menzies, where the legal team representing the Megrahi family outlined the grounds for their appeal.

In their written opinion, delivered by Lord Carloway this week, the judges allowed the appeal in relation to the argument that "no reasonable jury" could have returned the verdict the court did, and on the grounds of non-disclosure of documents by the Crown.

At the hearing in August, lawyers for Megrahi's family said it is "in the interest of justice" that the defence get to see the two PMDs.

Raab signed new public immunity certificates that month.

In them he states: "I am satisfied that the production of the documents would cause real harm to the United Kingdom Government's international relations.

"It would also cause real harm to the national security of the United Kingdom, because of damage to counter-terrorism liaison and intelligence gathering between the United Kingdom and other states.

"The documents were provided in confidence to the United Kingdom Government by another state. Disclosure of the documents would harm the United Kingdom's international relations with that state.

"It would undermine trust in the United Kingdom of the state whose confidence were disclosed."

He added disclosing the documents would "raise serious questions in the minds of other governments around the world about the confidentiality of their communications with the United Kingdom Government and therefore their willingness to make such a disclosure commitment".

Lord Carloway wrote: "In these circumstances, the court considers that it must see the PMDs before reaching a decision."

A hearing on the matter will now take place, with special counsel appointed to represent Megrahi's son.

The judges said only after that hearing can it be decided whether the PMDs should be disclosed and form part of the second ground of appeal.

Megrahi abandoned his initial appeal in 2009, shortly before his release from prison on compassionate grounds. He died in 2012.

The full appeal is scheduled to start on November 24.