Tunisian law enforcement units deliberately delayed their arrival on the scene of the terrorist attack in Sousse in which 38 tourists were killed, an inquest has heard.
The hearing into the deaths of 30 Britons in the June 2015 assault by extremist Seifeddine Rezgui Yacoubi heard that a local investigation into the slaughter criticised some police for stalling as they made their way to the five-star Riu Imperial Marhaba Hotel.
Three of the victims of the attack were Irish - Lorna Carty and Larry and Martina Hayes.
Rezgui "systematically" gunned down the innocent tourists on the hotel's beach before going into the grounds and the building and killing more, the hearing at the Royal Courts of Justice in London was told.
CCTV footage played to the packed courtoom, full of relatives of those who died, showed the killer as he approached the hotel with his gun hidden under a parasol. More graphic scenes showed him enter the building and shoot at least one tourist.
Samantha Leek QC, counsel to the inquest, said a report by Tunisian Judge Akremi had identified failings by local units which could have ended the slaughter before more police arrived and shot Rezgui dead.
She said the inquest would hear evidence from that report citing an unnamed interior minister as saying some Tunisian security officers nearby had consciously slowed down their arrival.
Ms Leek said: "He said the units that should have intervened in the events deliberately and unjustifiably slowed down to delay their arrival at the hotel.
"They had the ability to put an end to the attack before the police arrived but wasted a considerable amount of time in getting to the hotel."
Footage shown to the inquest included the shooting of 72-year-old grandfather Bruce Wilkinson, from Goole, East Yorkshire. A woman, believed to be a family member, left the room before it was shown.
Another clip was shown of the gunman being dropped off in a white van, before walking away carrying a large item.
In another he was seen walking along the shoreline, past a tent and yellow boats, with people seen running in panic in what is believed to have been the beginning of the attack.
Ms Leek added that on June 26 2015 Rezgui "entered the hotel from the beach, carrying an automatic weapon and a number of explosives".
She added: "He systematically took the lives of 38 people who had travelled to Tunisia for enjoyment, luxury and relaxation."
An armed guard on the beach opened fire on Rezgui, but fell to the ground "seemingly unconscious" after the gunman threw a grenade at him, she added.
This led to a local speedboat driver, named as AI, picking his gun up and attempting to confront Rezgui. However he was unable to work the weapon.
She said Rezgui was thought to have acted alone on the beach - albeit with an accomplice in a van nearby - and AI brandishing the gun may have sparked reports at the time of a second gunman involved in the shooting.
The hearing, scheduled to last for seven weeks, will also examine security in place at the hotel by tour firm TUI and the travel advice issued for Tunisia by the UK Government.
Before Monday's hearing the Government applied for certain elements of the inquests to be kept private over concerns about national security.
An earlier hearing was told that many families feared the Foreign and Commonwealth Office (FCO) may have failed in its responsibilities to thousands of British tourists.
The Sousse atrocity came months after a terror attack at the Bardo National Museum in the capital, Tunis, in March 2015 in which 24 people were killed.
Some of the families of those caught in the Sousse attack said they had been assured by tour operator Thomson that it was safe to travel to Tunisia after the Bardo attack.
TUI, the travel company that owns Thomson, is represented at the inquest, as is the Government.
Ms Leek said the inquest would hear evidence "critical of TUI" as well as witnesses on behalf of the firm.
When Ms Leek referred to the possibility of asking witnesses questions that relate to "sensitive security material", Coroner Judge Nicholas Loraine-Smith said: "I am very keen to avoid any in-camera hearings."
Detective Superintendent Mark Gower, from the Metropolitan Police's counter-terrorism unit, took the court through CCTV and 3D maps of the area of the attack. He said several requests were made to Tunisian authorities for material but only images from eight cameras was received.
"We know there were other cameras ... whether they were genuine or dummy cameras we don't know," he said.
The consular team in the Department and the Irish Embassy in Madrid, which is responsible for Tunisia, and the Irish Honorary Consulate in Tunisia, have been involved in providing active and ongoing assistance and support to the families of the three Irish citizens who lost their lives in the terrorist attack at Sousse in June 2015.
A spokesperson said officials from the Department remain in ongoing contact with the families.
"The Department keeps its Travel Advice for all countries under constant review, taking into account all available information on relevant threats and risks. Our current advice in respect of Tunisia is that Irish citizens should avoid all non-essential travel to that country. “
Officials on the outskirts of the coastal Tunisian city of Sousse have launched a major search operation, after two men on a motorcyle armed with a rifle opened fire on three policemen, killing one.