The release of MI5 files have now shed new light on the failed bombing in 1981, which was the only IRA attack on Scottish soil.
British Petroleum "balked" at the cost of securing the site to the satisfaction of the Secret Service, despite a reconnaissance visit by an MI5 officer which highlighted the necessity of securing the power station 500 yards from where the Queen would perform the opening ceremony of Europe's largest oil terminal on 9 May, 1981.
An IRA agent who had spent the past two years on the construction team was able to hide a bomb inside the power station, which went off just as the Queen appeared in the open.
Remarkably the bomb's detonation was at first mistaken for an electrical fault and was not even noticed until after the event. But a subsequent investigation revealed the IRA had planned to detonate a larger six-pound device but were foiled, not by the security services, but by their own loss of nerve.
The inside story of the only IRA attack on Scottish soil is revealed in The Defence of the Realm, the authorised biography of MI5, by Christopher Andrew, a leading historian on intelligence.
"Due to a lapse in protective security by British Petroleum, PIRA (the provisional IRA) came close to achieving one of its most spectacular coups," said Andrew. "BP, however, balked at the cost of implementing all the recommendations, which ran into seven figures, and detailed discussions were still continuing at the time of the attack."
The attack was launched at a time of intense Republican feelings, just four days after the death of Bobby Sands, the first of ten hunger strikers to die in the Maze prison near Belfast.
It was later discovered that the large construction team at Sullum Voe, many of them Irish, had included a number of known or suspected Republicans. After forensic examination of more than 60 dustbin-loads of debris, the bomb detonator was identified as coming from the Irish Republic.
Later, police inquiries found that the two parcels, each containing a bomb, had been posted to a Republican militant working on the construction of the terminal.
When the second parcel was delayed in the post, he appears to have panicked, believing that it had been intercepted en route by the security services, and fled without collecting either his cards or his bonus pay for two years' service at the site.
The Republican militant stayed only long enough to plant the first bomb, or perhaps pass it on to an accomplice. The second parcel, containing a 6lb bomb and a 12-day timing device, arrived after his departure and remained uncollected in the construction village post office until, absurdly, it was forwarded to (but failed to reach) his address in Northern Ireland.
On the day of the inauguration, the Queen, on the royal yacht Britannia, and the King of Norway on board the Norge arrived at Sullom Voe. Dense fog meant the large police contingent from the Scottish mainland arrived too late to complete more than brief physical security checks before the opening.
As the Queen appeared, the bomb in the power station 500 yards away went off, unnoticed. There was little structural damage and no casualties. When it was later discovered it was not made public.
The PIRA Overseas Department was deeply disappointed not to hear news of a disruption and several news agencies received phone calls from people speaking with an Irish accent, asking whether there had any reports of an incident at Sullum Voe. PIRA claimed afterwards to have "breached the English Queen's security".
Professor Paul Wilkinson, chairman of the Advisory Board of the Centre for the Study of Terrorism and Political Violence at the University of St Andrews, said: "The IRA always liked to present itself as friendly to other nations which they thought were under the heel of English imperialism. They wanted to try to encourage a feeling of affinity with Republicans in Scotland.
"They sustained that policy and that made Sullum Voe seem rather odd, because, after all, Shetland is normally regarded as part of Scotland, even if sometimes they grumble about Edinburgh's control.
"It might have seemed important to strike at the critical infrastructure because oil was clearly going to be so important to the future of the UK as a whole. But it has always remained a bit of a mystery."
A spokesman for BP said: "I don't think it was ever established that it was a bomb."