Intelligence services had information of terrorist threats to workers in Algeria just weeks before seven Britons were killed at a gas plant.
An inquest heard details that the government failed to pass information onto BP about reports of terrorists seeking to kidnap foreigners.
The Britons were among 40 staff killed when Islamist terrorists stormed the Amenas facility, which is jointly owned by BP, Statoil and Algerian state company, Sonatrach in January 2013.
The inquest was told earlier this week that the warning were not acted upon because of a “delay in processing”.
Judge Nicholas Hilliard, QC, assistant coroner for West Sussex, said that the details of the intelligence failure could not be revealed publicly on grounds of national security.
He said that Britian’s intelligence services did not have specific information that an attack was imminent, but said: “I had a specific concern about some information which was received by the British government before the attack.
“That information was not dealt with speedily and there was no good reason for the delay. I was concerned about whether, had it been dealt with quickly, it may have been capable of leading to some effective warning being given to BP.”
Last month, government lawyers had argued successfully for a “public interest immunity” to be issued, preventing disclosure of what the coroner called a “substantial” dossier of intelligence material.
The coroner’s interim judgement had also pointed out that BP was aware of “the general risk of kidnap”.
Hostages were forced to wear explosives around their necks and to act as human shields for the terrorists from an Al-Qaeda linked Algerian group called “the masked brigade”.
Algerian security forces retook control of the plant four days after the attack on January 16, 2013.
A government statement to the coroner, now made public, said: “HMG did not receive some information late in 2012, which, it was later established, was some months old, but there was a delay in processing that information.
“The question arises as to whether this delay made a difference.
“HMG has considered this issue and concluded that it cannot be sure about what might have happened.
“However, but for the delay there is a possibility that some of the information would have been given to BP before the attack.”
Lawyers for the victims’ families said that they had been horrified by the revelations of poor security.
A statement from the Foreign Office said that the government could not have prevented the attack.