On 21 December 1988, Pan Am Flight 103 from Frankfurt to Detroit exploded over the Scottish town of Lockerbie. All 259 passengers and crew, and 11 Lockerbie residents were killed.

Thirteen years later, a Libyan, Abdelbaset al-Megrahi, was found guilty of the bombing, and sentenced to life imprisonment. For reasons of international diplomacy, the trial was held not before a Scottish jury but before three Scottish judges in a special court in the Netherlands. Last week, the Scottish criminal cases review commission (SCCRC) referred the case to the appeal court because it “believes that a miscarriage of justice may have occurred”.

It’s the second time that the SCCRC has referred the case to the appeal court. In 2009, before the previous appeal could be completed, the Scottish government released Megrahi on “compassionate grounds” (he was suffering from prostate cancer). He returned to Libya, where he died in 2012.

The case against Megrahi was circumstantial and dubious. Jim Swire, whose daughter Flora was killed on Flight 103, has devoted his life to unearthing the truth about the bombing, and has long campaigned to prove Megrahi’s innocence. So has Robert Black, one of Scotland’s leading jurists, and the man who came up with the idea of a special trial in the Netherlands.

Many, including apparently the CIA, have suggested that the evidence pointed to Iranian, not Libyan involvement, possibly through a radical Palestinian cell.

Given the horror of the bombing, most people have been happy that someone was convicted, and not worried about the details. But, as Swire and Black bravely attest, truth and justice matter, even, perhaps especially, in a case as terrible as Lockerbie. The appeal may finally throw some light on both.

• Kenan Malik is an Observer columnist