Security experts at an Algerian gas plant that was overrun by terrorists in a siege that claimed the lives of six British hostages, including two Scots, had wrongly thought a vehicle-based suicide bomb was a more likely form of attack, an inquest has been told.

Oil workers Carson Bilsland, 46, of Bridge of Cally, Perthshire, and Kenneth Whiteside, 59, originally from Glenrothes, Fife, were among 40 hostages killed by al Qaeda-linked Islamists during a four-day stand-off in January 2013 at the In Amenas complex.

A group of 30 terrorists armed with machine guns, sniper rifles and explosives took over the site and took employees hostage.

The other UK victims were Sebastian John, Stephen Green, Paul Morgan, Garry Barlow and Carlos Estrada.

At the hearing in London, the site's deputy general manager at the time, retired BP employee Mark Cobb, said the intelligence from security analysis suggested the greater threat was from a suicide attack rather than a direct strike by armed terrorists.

He told the court: "It was always communicated to me by my [security] liaison team that the greatest fear was a suicide attack in a vehicle in our facilities, or someone trying to sneak in a bomb in a vehicle."

He added: "Never once did any one of my security personnel tell me of a scenario where they thought we could be attacked by a single group of armed terrorists forcing their way into the facility.

"Anything was possible, but the most likely form of attack communicated to me was of a vehicle-borne suicide bomb."

During his cross-examination of Mr Cobb, Andrew Ritchie, QC, representing Mr Estrada's family, said there was widespread evidence that terrorist groups, many with links to al Qaeda, were highly active in the wider North African region in the years leading up to the siege.

He cited evidence, including news reports, of terrorists kidnapping expat workers, attacking numerous government facilities and oil assets, setting up terror training camps and being caught with military weapons.

On one occasion, just three months prior to the siege, Mr Ritchie said a report highlighted an incident in which 12 terrorists were arrested after they were caught specifically targeting and photographing energy installations in Hassi Messaoud, to the north of In Amenas.

Despite the US Government repeating a warning in September 2012 that petroleum companies were potential terror targets, the site's security crisis plan was not raised above a level of "medium", and there was no request for extra armed gendarmes.

Describing the general threat level at the time, Mr Cobb said: "When I look at it holistically, over the 16 years I was in the country I had seen a number of security incidents that occurred. You get a general sense of whether they are increasing, staying the same or going down. My general feeling was terrorist incidents in the country were pretty much static."

He previously explained that the area where In Amenas is located is inside a "ring of steel" controlled by Algerian military, and that the site - which is jointly run by BP, Norwegian state oil company Statoil and the Algerian government-owned Sonatrach - has its own dedicated group of around 160 armed gendarmes in charge of security.

Mr Cobb said he had been assured by his staff they were competent, but had never seen them carrying out any drills.

There were no gendarmes posted to the site's look-out towers at the time of the attack. Asked by Katie Gollop, representing the family of Mr Green, if they would have seen the terrorists coming, Mr Cobb said: "I suppose so, yes."

The inquest continues.