No criminal proceedings can be brought against anyone in connection with the death of a 12-year old girl, crushed by a falling wall in her school gym.

This came to light on the sixth day of a Fatal Accident Inquiry at Edinburgh Sheriff Court into the death of Keane Wallis-Bennett, a first year pupil at Liberton High School in the city on the morning of April 1, 2014.

Garry Stimpson, Principal Inspector of the Health & Safety Executive in Scotland, told the Inquiry there had been "considerable discussion" between him and the Crown Office regarding the "freak accident".

The decision, not to take criminal proceedings against anyone was, he said, taken by The Crown Office as the present law applies to employees and pupils are not employees.

Describing his investigation into the girl's death, Mr Stimpson described it as: "One of the most difficult cases I have ever dealt with".

Asked why the regulations did not apply to non-employees, Mr Stimpson replied: "That lies with Parliament".

Mr Stimpson told the Inquiry that, following the accident, the HSE had been "very keen" to ensure that free-standing masonry walls across the whole of the UK were checked and councils throughout the country were alerted.

He said that "Edinburgh City Councill had done everything possible to comply with regulations".

Councils had been advised to examine all existing walls.

The walls in the old PE Department at Liberton High had been there since the school opened in the 1950s.

An examination of the collapsed wall showed that tiles at its base had been removed by some person or persons at "some time in its history" which had allowed the ingress of water.

A check on the walls in 2012 and 2013 showed no cause for concern.

Mr Stimpson said: "No foreseeable defects could be identified by the naked eye".

The inspection being a visual one.

The wall had fallen in a single piece and its falling weight was 1.9 tonnes.

There was, he added, no explanation why the wall fell.

He said: "It could have been deliberate force against the wall or boisterous activity in the changing room".

The wall's design was technically flawed from the outset.

He said: "It is clear the walls were inadequately designed even by the building standards at the time.

"They had been, for over 60 years, the subject of abuse by various users".

The Fiscal commented: "We were all children at one time".

The Inquiry was adjourned until tomorrow