Media playback is unsupported on your device Media caption Tunisia inquest shown police map of killer's spree

Tour operator TUI was not made aware of security risks prior to the 2015 attack at a Tunisian hotel where 30 Britons were killed, an inquest has been told.

A TUI director said there had been no reference to risk in Tunisian resorts in its risk registers before the attack in Sousse in which 38 people died.

But a lawyer for the victims' families said a security audit before the attack in June 2015 could have saved lives.

The attack was the deadliest on Britons since the 7 July 2005 London bombings.

Families of Britons killed in the attack received an apology after they had to sit through "distressing" evidence with no warning during the inquest at London's Royal Courts of Justice.

Islamist gunman Seifeddine Rezgui killed 38 people at the five-star Riu Imperial Marhaba on 26 June 2015. He was shot dead by police about an hour after the attack began.

The inquest heard from Jacqueline Reynolds, a director of risk and compliance for TUI, that the company did not carry out frequent security risk assessments on resorts or hotels before the attack.

TUI appointed security consultancy company Covenant to carry out an audit in the resort in July 2015, but this excluded the Riu Imperial Marhaba hotel, where the attack had just taken place.

The inquest heard Covenant, which did work for TUI in Egypt, had previously suggested it would be "worthwhile" to discuss Tunisia following the attack at the Bardo National Museum in Tunis in March 2015.

But the firm's regional director for the West Mediterranean, Ian Chapman, said in his statement that he did not arrange a meeting with the consultancy.

Covenant's briefing note after its audit in July said that staff's understanding was considered to be "weak".

Andrew Ritchie, counsel for the families of the victims, said TUI had carried out health and safety checks at hotels using a guidebook produced by Abta, but the only section they did not carry out was that on security.

He put it to Ms Reynolds that had TUI instigated the security audit after the Bardo attack it would have had 11 weeks to make changes.

He said the company "might have saved quite a few lives by having those things in place".

He also said TUI should have audited security after the Foreign Office advised there was a high risk of terror activity after Bardo.

Ms Reynolds disagreed, saying the company had been told on "numerous occasions" that the advice would not be changing. She added that security was not part of the company's safety audits because conditions and circumstances were "variable".

But she agreed with Mr Ritchie's summary that TUI "relied on hotels and local authorities" regarding these matters.

Image caption Thirty of the 38 people killed by a gunman on a Tunisian beach were British

The inquest heard a statement from a security guard at the hotel that security forces did not arrive at the hotel until 12:10 to 12:15, after the gunman had already left the hotel.

He said he first saw people fleeing because of the attack at 11:40.

Another security guard said he heard the sound of gunfire at 11:45 and that security forces did not manage to intervene.

The head of the guard team said his guards were "not equipped with any means whatsoever to repel any sort of attack".

The inquest previously heard that UK officials had been told of security concerns but decided against discouraging all travel to Tunisia.

It also heard a report by a UK embassy official in January that said there was "little in the way of effective security" to protect from an attack from the beach.

Mehrez Saadi, the former manager of the hotel where the attack took place, previously told the hearing that just four unarmed, untrained security guards had been protecting the 631 guests.

He also said the CCTV camera at the front entrance had not been working on the day of the attack.

'Understandably upset'

The apology made to victims' families related to a witness statement of Camilla Bekkevold, resort team manager of travel company TUI, which included a first-hand account of the day of the attack in which she mentioned seeing bodies and referred to possessions such as a sun hat covered in blood.

Samantha Leek QC, counsel to the inquest, said: "Some of the families in court yesterday were understandably upset during the course of the reading of Camilla Bekkevold's statement.

"I apologise that we had not warned that that potentially distressing material was coming."

Over the next seven weeks, the inquest will examine whether the UK government and travel firms failed in their responsibility to protect British tourists.

The government has applied for some details to be kept private because of national security concerns.