The police response to the Islamic terror attack on a Tunisian hotel that led to the deaths of 38 tourists was "at best shambolic, at worst cowardly", a coroner has found.

Judge Nicholas Loraine-Smith released his findings after the inquest into the deaths of the holidaymakers concluded on Tuesday.

Gunman Seifeddine Rezgui opened fire on the beach and grounds of the Sousse hotel in June 2015.

Among the victims of the lone gunman were Jim and Ann McQuire from Cumbernauld, North Lanarkshire, and Lisa and Billy Graham from Bankfoot, Perthshire.

Judge Loraine-Smith said local police "most certainly" were responsible for tourist security, and said: "Their response could and should have been effective."

He added: "The response by the police was at best shambolic, at worst cowardly."

The inquest had previously been told police deliberately delayed responding to the massacre, in which a total of 30 Britons were killed.

Holiday firm TUI and the owners of the the five-star Riu Imperial Marhaba Hotel could not have done anything before the attack to "possibly make a difference", the coroner found.

As the packed courtroom watched in silence he said the only factor that may have made a material difference was if the hotel had armed guards.

Judge Loraine-Smith said: "Having reviewed the legal advice on gun law in Tunisia it's clear this was not a realistic option."

He added: "The simple but tragic truth in this case is that a gunman armed with a gun and grenades went to that hotel intending to kill as many tourists as he could."

The judge also pointed out there were customers who believed they had been "reassured" about safety.

The inquest heard from a holidaymaker who said his wife raised the March 2015 attack at the Bardo Museum in Tunis with a travel agent.

She said they had been told it was a "one-off" and the destination was "100% safe".

A Thomson travel agent told the inquest she did not give a safety guarantee to the couple and she would not say somewhere is completely safe.

Judge Loraine-Smith said there were customers who would not have gone to Tunisia if they had seen the Foreign and Commonwealth Office travel advice.

"Even prior to the attack on the Bardo Museum the advice was that there was a high threat of terror," he said, adding the advice pointed out that attacks could be "indiscriminate".