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

Four unarmed guards manned the Tunisian hotel where 30 Britons were killed in 2015 despite the resort being a known terror risk, an inquest has heard.

Former manager Mehrez Saadi told the inquests into the British deaths that gardeners had briefly doubled as security guards the previous year.

Islamist gunman Seifeddine Rezgui killed 38 people in total at the five-star Riu Imperial Marhaba, near Sousse.

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

UK officials had also been told of security concerns in Sousse six months before the attack in June 2015, but decided against discouraging all travel to Tunisia, the inquests heard.

The inquests, being held at London's Royal Courts of Justice, heard a report by a UK embassy official in January that said there was "little in the way of effective security" to protect an attack from the beach.

In a statement, Mr Saadi also revealed just four unarmed, untrained security guards were protecting the 631 guests and the CCTV camera at the front entrance was not working on the day of the attack.

However, he said the hotel had purchased metal detectors to check people entering the hotel and mirrors to check under vehicles.

Andrew Ritchie QC, who represents 20 of the victims' families, quoted from the heavily-redacted report into the security of about 30 hotels, including the Riu Imperial Marhaba, in three neighbouring Mediterranean resorts on the Tunisian coast.

He said the report had paid particular attention to beach access points after an attack on the Riadh Palms Hotel in Sousse October 2013 was launched from the beach.

Image caption Seifeddine Rezgui was caught on CCTV during the attack

Rezgui was shot dead by police about an hour after the attack began, but Mr Saadi said police were slow to respond when he called them to report what was happening.

"Security services did nothing to stop the attack during the whole time," he said. "I didn't understand why."

Arab Spring fears

The government's travel advice website had warned in June 2015 that there was a "high risk of terrorism" in Tunisia, but stopped short of telling tourists not to visit.

This was despite an attack on the Bardo Museum in the country's capital, Tunis, four months earlier, in which 24 people were killed, including 20 tourists.

In a YouTube video from December 2014 mentioned in the report, extremists linked to the self-styled Islamic State group also warned they would target tourists in the area.

Jane Marriott, the Foreign Office's Middle East and North Africa director at the time of the Sousse attack, told the inquests there had been "little public desire for a more intrusive police presence in Tunisia", which had been a dictatorship before the Arab Spring revolution in 2010.

She added: "This made it difficult for the authorities to be proactive with security."

The inquest was shown an extract from minutes of a meeting between UK embassy officials and tour operators in Tunisia shortly after the Bardo attack.

It said: "Following the incident, the knee-jerk reaction was to pull British tourists out of Tunisia.

"Embassy staff... lobbied hard to retain the tourists here in Tunisia, but agreed to strengthen the text of the travel advice to reflect the severity of the incident."

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

Ms Marriott also told the court that Hamish Cowell, the UK ambassador to Tunisia from 2013 until December last year, had taken his family to Sousse on holiday in May - two months after the Bardo attack and less than two months before the beach shootings.

The court also heard from survivor Paul Thompson, who had been advised by his travel agent TUI that it was "100% safe" to go to Sousse.

Mr Thompson had gone to a shop in his home town of Ilkeston, Derbyshire, in May 2015 with his daughter, where he was told that the Bardo attack had been a "one-off", Mr Ritchie told the inquest.

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.