More than 70 Scottish schools have been found to have defects similar to those in Edinburgh schools closed due to safety fears, according to a BBC investigation.
Concerns over safety were raised after 17 schools in Edinburgh were shut temporarily last April following the collapse of a wall at Oxgangs Primary in the city in January 2016.
The city council took the decision to shut the schools, which were all built or refurbished as part of the same public-private partnership (PPP) scheme, after Edinburgh Schools Partnership (ESP), which operates the schools, said it was unable to provide safety assurances for the properties.
Similar defects have since been found at 71 schools in 15 council areas, a BBC Scotland investigation has found.
The broadcaster asked all of the country's local authorities whether repair work involving wall ties or "significant structural issues" had been done at PPP schools, or others built under schemes such as non-profit distributing (NPD) or "design and build", in the past year and a half.
Repairs have been carried out on most of the buildings, however work is still to be completed on six of them.
An independent report into the closure of the 17 schools in Edinburgh led by Professor John Cole concluded that it was down to timing and luck that no deaths or injuries occurred in the incident at Oxgangs Primary.
Approximately nine tons of masonry fell on an area where children could easily have been standing or passing through.
Around 7,500 pupils and more than 600 staff across the city had to be relocated while the inspections and repairs took place at the 17 establishments.
Some councils did not respond to the BBC's freedom of information requests while 11 said they had not done the kind of intrusive surveys which would uncover problems.
Education Secretary John Swinney MSP said it was up to local authorities to ensure the safety of the buildings, but that the Scottish Government has given them support and technical guidance to help them fulfil their statutory duties.
He told BBC Scotland: "It's important to us that local authorities fulfil their obligations within statute and that's what we ask local authorities to do, it's what we did last April when we first set out guidance through the Scottish Futures Trust to individual local authorities to ensure that they took the steps to ensure that any issues that arose out of deficiencies in the construction process or in the certification process were taken into account and adequately addressed by individual local authorities where the responsibility lies to take forward."
Mr Swinney said that the schools involved in the BBC investigation were built more than 10 years ago and that construction methods changed with the change of government in 2007.
He told the BBC: "We brought in new mechanisms through the Scottish Futures Trust which doesn't make the same mistakes that were made under PPP.
"These schools you are talking about were built under a brick and block system. We now use a steel framing system which is much more individually configured to individual schools.
"In the Edinburgh example, 17 schools were taken forward as a batch-purchase by the City of Edinburgh Council. That no longer happens. We now do individual design based on the steel framing system to customise schools for the needs of individual localities."