NICOLA Sturgeon has led calls for a full inquiry after safety fears forced the closure of 17 Edinburgh schools leaving thousands of pupils unable to attend class for an extra week.

Around 7,600 pupils have been affected after 17 schools were shut down on Friday night amid concerns about "serious defects" with some of the buildings that were all constructed under a £360 million private finance scheme.

As a stop-gap, pupils have been invited to study at NHS medical buildings, Edinburgh University and the Scottish Parliament until their schools are deemed safe.

HeraldScotland: HolyroodHolyrood

Read more: angry parents call for action as pupils left in limbo by Edinburgh school closures

Every Scottish council is being tasked with carrying out surveys of school buildings that could be affected.

Last night, the First Minister said there is an argument for “longer term inquiry” into the private finance deals which has forced an unprecedented number of schools to be closed because of "extortionate PFI contracts" that had delivered "substandard buildings".

“These were schools built 10 or more years ago under a system of private finance initiative (PFI) that at the time people, including the SNP had real concerns about - concerns being that these contacts prioritised private profit over quality and the interests of pupils," she said.

“If it turns out that this a legacy of those PFI projects, then there will be big questions for those who were in charge at the time to answer.”

Read more: Councils told to check school building safety after shock Edinburgh closures

It comes as Scotland's largest teaching union called for a review of all public private partnership contracts in Scotland.

EIS general secretary Larry Flanagan said: "The EIS welcomes that the safety of pupils and staff is being treated as a priority, while recognising that these short-notice closures will be highly inconvenient for pupils and parents.

"However, we must also question how such significant defaults could escape normal building control scrutiny and we believe it is now necessary for an urgent review of all PPP/PFI contracts, including the terms of the private maintenance contracts which are often both expensive and extremely restrictive."

Scottish Green candidate for Lothian, Andy Wightman, and Edinburgh Southern SNP candidate Jim Eadie previously called for the contracts to be investigated.

Mr Eadie said the closures had come at "incredibly important time" and could affect pupils' performances in upcoming exams.

Read more: pupils to return to class next week after Edinburgh school closures spark calls for a review

Problems were first uncovered in January when a wall at Oxgangs Primary collapsed during high winds.

Three other schools were later closed after inspections revealed problems with the way walls had been built.

On Friday, Edinburgh City Council closed 10 primary schools, five secondaries and two additional support needs schools - and the Goodtrees Neighbourhood Centre.

Back up measures have now been drawn up to ensure all primary and special school pupils will be back at school by Monday.

The 10 affected primaries will remain closed for the rest of the week.

Older pupils facing national exams would be prioritised in contingency plans to ensure revision time was not compromised.

It is thought they could return to lessons from Wednesday.

Seamus Searson, general secretary of Scottish Secondary Teachers' Association, said: "For young people due to start sitting national exams in a matter of days, the timing could hardly be worse.

"Edinburgh City Council and the building contractors have known about these structural problems since walls started collapsing in January, yet it is only now that proper inspections are taking place.

"Pupil and staff safety is paramount, but youngsters' life chances are also top priority."

The Scottish Qualifications Authority (SQA) said it would work with the council amid calls to delay a series of exams until the crisis concludes.

Liam McArthur, education spokesman for the Liberal Democrats, said: "There is a strong case for the SQA to look again at the timings of some of these papers.

"If exams need to be delayed then they should be and the exam boards need to work with schools to ensure that this is done with minimum disruption."

Scottish Labour leader Kezia Dugdale said: "There are questions of course about what is happening around the quality of the building that has taken place, and yes we should examine those questions."

Education Secretary Angela Constance said in an interview: "The situation is deeply concerning.

"The Scottish Government expects all local authorities to exercise their duties in the provision of education in a safe environment.

"The immediate priority is to ensure that everything is being done to support children."

And she indicated she would launch an inquiry. "We will certainly need answers about what went wrong and why."

Mary Alexander, Unite deputy Scottish secretary, said the crisis is a national scandal and that it "could be the tip of the iceberg".

Council chief executive Andrew Kerr said: “We have plans in place to ensure all primary and special school pupils will be back in schools by Monday of next week subject to the Council getting access to the closed schools.

“Our focus is very much on getting our school children back into education as soon as possible."

But "as yet we are not able to determine the full extent of this or the potential impact it may have".

The closures include 10 primary schools, five secondaries and two additional support needs schools.