Government officials have told the BBC they feared the 2012 London Olympics opening ceremony might have come under cyber-attack, with the event potentially going dark after an attack on the electricity grid.
The threat did not materialise, but officials have told the BBC they "put extensive precautions in place".
"Under Attack: The Threat From Cyberspace" is a three-part series being broadcast on BBC Radio 4, with details of the Olympics ceremony threat covered last night (Monday 8 July).
"There was a suggestion that there was a credible attack on the electricity infrastructure supporting the Games," Olympic cyber security head Oliver Hoare, who received information on the potential attack, told BBC Radio 4.
"And the first reaction to that is, 'Goodness, you know, let's make a strong cup of coffee,'" said Hoare.
Incidentally, revealed Hoare, "We'd tested no less than five times the possibility of an attack, a cyber-attack, on the electricity infrastructure."
Although an attack didn't take place, he said this would have proved vital in ensuring an effective response, from a team that included Olympic organisers Locog and private sector service providers like BT.
The initial response to the threat came from the Olympic Cyber Co-ordination Team (OCCT), based at MI5 headquarters in Thames House.
There were two priorities, says the BBC programme. The first was to investigate how credible the threat might be. The information had come in overnight and was based on the discovery of "attack tools" and targeting information "that it was thought at the time might relate to the Olympics".
While this investigation continued, officials also put in place contingency plans in case the attack materialised. "The clock was absolutely ticking," recalled Hoare.
"We effectively switched to manual, or had the facility to switch to manual. It's a very crude way of describing it. But effectively we had lots of technicians stationed at various points," he said.
In the afternoon a meeting was also held in the Cabinet Office briefing room chaired by deputy national security adviser Oliver Robbins, where different partners could join in via videoconferencing, from places such as the Olympic Park.
Contingency plans were discussed and ministers informed. "Confidence grew that if the threat materialised it could be dealt with", says the programme.
Hoare recalls a conversation an hour or so before the opening ceremony, in which he asked someone how the situation looked. "Good news," the individual replied. "If the lights go down we can get them up and running regardless within 30 seconds."
But, added Hoare, "Thirty seconds at the opening ceremony with the lights going down would have been catastrophic in terms of a reputational hit. So I watched the opening ceremony with a great deal of trepidation."
Hoare says that watching at home with his family, who did not know about the threat, he "twitched every time the lights dimmed".