An S1 pupil has died after an internal wall inside the changing rooms of the gym hall at Liberton High School collapsed and landed on top of her.

The incident happened just before 10am this morning and emergency services remain at the scene which has been cordoned off as enquiries continue.

A special operation response team from the Scottish Ambulance service was deployed at 9.53am and was quickly joined by five police cars, three fire engines and a heavy rescue tender.

Parents were notified by a text message sent and dozens turned up at the school where they were allowed into the main building to collect their children.

A Police Scotland spokesman said: “Police in Edinburgh responded to Liberton High School after a wall within the building collapsed, injuring a female pupil at 10am. She was treated by ambulance staff on the scene, but was pronounced dead. Inquiries into the full circumstances surrounding this incident are ongoing and we are working alongside our relevant partner agencies.”

A spokeswoman for the Scottish Fire and Rescue Service said: “Firefighters assisted ambulance personnel to remove a female casualty from a collapsed structure but sadly she was pronounced dead at the scene. Thoughts are with the family at this difficult time.”

A spokesperson for Edinburgh Council said: “A pupil at Liberton High School has sadly died following an incident at the school. Senior education staff and Health and Safety officers from the council are at the school providing support to staff and pupils. An updated statement on behalf of the school will be issued later.”

Scotland’s Minister for Learning, Alasdair Allan said: “I’m deeply saddened by this terrible news and my thoughts are with the pupil’s family and friends. City of Edinburgh Council has arranged for support to be available to the school’s pupils and teachers. At the same time, Police Scotland and the council will begin to investigate this tragedy. We remain in close contact with the council and stand ready to provide any help that may be needed.”

A spokeswoman for the Health and Safety Executive said: “HSE is aware and is liaising with Police Scotland.”

A number of politicians expressed their sympathy on twitter.

Deputy first Minister Nicola Sturgeon tweeted: “Awful news from Liberton High. My thoughts and condolences with family and friends.”

Scottish Education Secretary Michael Russell tweeted: “Very distressed to hear of fatality at Liberton High in Edinburgh – thoughts with family and the whole school community.”

Edinburgh South MP Ian Murray tweeted: “Tragic news coming from Liberton High School. My thoughts go out to the family and all at the school. Dreadful news.”

In February Edinburgh Council was fined £8000 for breaching Section 3 of the Health and Safety at Work Act following an incident at Liberton High School in December 2011 when a 15 year old pupil fell down a 20ft lift shaft.