A construction firm at the centre of the Edinburgh schools crisis was responsible for the closure of a school in Glasgow with the same fault in 2012.

The structural problem found at Lourdes Primary in Glasgow four years ago was the same as the fault discovered last week at schools in Edinburgh. Miller Construction was involved in both cases.

A total of 17 primary and secondary schools have been closed in Edinburgh after structural concerns were discovered late last week at Oxgangs and St Peter's primaries.

Engineers found header ties were missing - the structures used to fix the top of a wall to the rest of the building.

The same issue led to the temporary closure of Lourdes Primary, with pupils having to be moved to other schools.

In a letter to parents at the time, the firm blamed poor workmanship and admitted header ties were missing from the brick walls.

A spokeswoman for Glasgow City Council said: "The issue over the building defects in Lourdes Primary School that came to light in November 2012 was handled quickly and effectively, with Miller Construction accepting all responsibility.

"They paid all costs relating to the works and decant costs. The council then ordered structural surveys on all Glasgow schools Miller Construction built and all came back clear.

"These are the same schools that have been inspected again recently and we have no cause for concern but for further reassurance, our PPP contractor 3Ed, will be inspecting them again this week.

"Our schools will be open as normal on Monday, 18 April, following the spring break."

Miller Construction was bought by another firm, Galliford Try, in 2014.

Edinburgh City Council revealed contingency plans to support around 2000 secondary pupils affected by the closure on Tuesday afternoon.

No arrangements have yet been made for nearly 6000 displaced junior and primary students. An update on plans for S1, S2 and S3 pupils is expected later in the week but primary and special school pupils will have to wait until next Tuesday before they are given space in alternative schools.

Around 2000 pupils in S4, S5 and S6 at Craigmount High, Drummond Community High, Firrhill High, Gracemount High and Royal High have been affected by the crisis.

The council said it had made senior pupils, who are preparing for exams, a priority. Older pupils from Drummond, Firrhill and Royal High, which were only partially renovated as part of the PPP1 project, will return to their own schools on Wednesday from 9.30am.

Gracemount S4, S5 and S6 pupils will go to Liberton High School from Wednesday, while their counterparts from Craigmount will go to Tynecastle High School from Thursday.

Gracemount and Craigmount are expected to be closed for repairs for some time as major defects were found on Monday.

The structural problems were similar to those at Oxgangs and St Peter's primaries, which prompted the initial closure announcement late on Friday.

Edinburgh City Council chief executive Andrew Kerr said: "We identified senior phase pupils who are preparing for their exams as a priority and I'm pleased that we now have arrangements in place for them to go back to school.

"Work is continuing to identify alternative options for primary, special and S1 to S3 pupils which we will communicate to parents as soon as we have the information."

He said he recognised the uncertainty of the situation was a "significant inconvenience" to parents.

Mr Kerr added: "I want to thank them for their patience as we continue to work through this issue."