An inquiry has heard that Edinburgh City council met its obligations on maintenance at the school where a wall collapsed and killed a pupil.
Keane Wallis-Bennett, 12, was fatally injured at Edinburgh’s Liberton High School in April 2014.
Garry Stimpson, of the Health and Safety Executive, said it was not obvious the wall would cause a problem.
He described his investigation into the death as “one of the most difficult cases I have ever dealt with”.
Mr Stimpson co-ordinated the HSE’s inspection of the wall after the incident in which Keane died.
He told the fatal accident inquiry the structure had been built along with the rest of the original building in 1959, and there were no obvious defects in construction, although there was a crack in it.
No criminal proceedings
Mr Stimpson said the council had an effective system for reporting faults in their buildings, but nothing about this particular wall had been recorded.
He added that the council had met requirements on maintenance and inspections at the school, and did what any reasonable local authority would be expected to do.
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.
“Edinburgh City Councill” he said “had done everything possible to comply with regulations”.
The inquiry also heard that no criminal proceedings can be brought against anyone in connection with Keane’s death, because the regulations concern employees and pupils are not employees.
Mr Stimpson said there had been “considerable discussion” between him and the Crown Office regarding the “freak accident”.
He said the decision not to take criminal proceedings against anyone was taken by the Crown Office.
The present law applies to employees and Keane was a pupil, not an employee.
Asked why the regulations did not apply to non-employees, Mr Stimpson replied: “That lies with Parliament”.
The inquiry at Edinburgh Sheriff Court continues.