Israel has cleared itself of any wrongdoing in a missile attack that killed four children on Gaza beach and injured a number of others during the July-August Operation Protective Edge.

The Israel Defence Force's Magistrates' Office said the attack - in which the victims were aged between nine and 11 - was a "tragic accident". Mohammad Ramiz Bakr, 11, Ahed Atef Bakr and Zakariya Ahed Bakr, both 10, and Ismail Mahmoud Bakr, nine, were killed when they were hit by rounds fired from a naval vessel.

The IDF said its conclusion came after an "extensive criminal investigation".

"During the investigation," the IDF said, "testimonies were collected from a large number of IDF soldiers and officers who were involved in the planning and execution of the attack."

The statement continued: "Additionally, an extensive number of documents relating to the attack were reviewed, along with video footage documenting the attack in real time, as well as media images and video footage which documented parts of the incident.

"Efforts were made to collect the testimonies of Gaza strip residents who were, allegedly, witnesses to the incident. In this context, the collection of testimony from three witnesses was coordinated. Regretfully, despite the prior coordination, the witnesses eventually declined to meet the investigators, and instead provided affidavits in regard to the incident."

It continued: "From the factual findings collected by the investigators, it revealed that the incident took place in an area that had long been known as a compound belonging to Hamas's Naval Police and Naval Force, and which was utilised exclusively by militants."

The Guardian reported, however, that the hut was in plain sight of nearby hotels housing international journalists, none of whom described seeing militants in the area at the time of the attack.

The IDF continued: "The compound in question spans the length of the breakwater of the Gaza City seashore, closed off by a fence and clearly separated from the beach serving the civilian population.

"It further found in the course of the investigation [including from the affidavits provided by Palestinian witnesses], that the compound was known to the residents of the Gaza Strip as a compound which was used exclusively by Hamas's Naval Police.

"The IDF carried out a number of attacks on the compound in the days prior to the incident. In the course of one such attack, which took place on the day prior to the incident [15 July 2014], a container located inside the compound, which was used to store military supplies, was attacked."