Tunisia beach attack
A police officer stands guard near the Imperial Marhaba resort, which was attacked by a gunman in Sousse, Tunisia in June 2015 Zohra Bensemra/Reuters

Five out of six members of the Tunisian police detained for cowardice and incompetence in the wake of the 2015 Sousse massacre which left 38 dead have been released, and are now working in resorts again.

An inquest into the Isis-inspired killings by Seifeddine Rezgui, the worst attack on British citizens since the 7/7 bombings, found police had "deliberately and unjustifiably" delayed their response to the shooting.

The coroner, Judge Nicholas Loraine-Smith, described the actions of police on the day of the shooting as "at best shambolic, at worst, cowardly".

He said: "They had everything they required to confront the gunman and could have been at the scene within minutes. The delay was deliberate and unjustifiable."

The Times reported that six officers present in the vicinity of the Imperial Marhaba were detained in January on the orders of a Tunisian judge, whose own findings on the attack were submitted to the seven-week-long British inquest.

However, despite the condemnatory nature of the findings of the Tunisian judge, it has been revealed by police sources five of the six officers continue to work in Sousse, assigned to protect the resort and tourists.

The five were released on 12 February amid wrangling from the Ministry of Interior, which exerted considerable pressure to have the men released from custody.

sousse attack
Family members of victims of the Tunisia terror attack and Tunisia terror attack survivor Owen Richards (R) and mother Suzy Evans (C) arrive for the first day of the inquest Getty

One of the individuals was identified as Mehdi Messai, commander of the coastguard in Port El Kantaoui, who was still in position, despite being closest to where the attack took place. He passed out at the scene of the attack according to the inquest because he feared Rezgui might have a second grenade.

Messai's corporal reportedly removed his shirt so he could not be identified as a member of the coastguard as he took his unconscious commander from the scene on their boat.

Ultimately Judge Nicholas Loraine-Smith said despite the hotel staff or its owners not been given training on what to do during a terrorist attack despite warnings one could have occurred, there wasn't anything that they could have done during the shooting that would "possibly made a difference".

"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," Loraine-Smith added.