Urgent building reviews are to be carried out after a 12-year-old pupil died at school when a wall within a PE changing room collapsed.

The girl, named locally and on social media as Keane Wallis-Bennett, was pronounced dead at Liberton High School in Edinburgh shortly before 10am today. Her family have been informed.

Pupils were sent home early, while police and health and safety officials launched an inquiry.

Edinburgh City Council said the wall that collapsed was a "free standing modesty wall", and all other such walls in its other schools are to be checked by building surveyors.

The school will not reopen this week and a full council survey of Liberton High will be completed before pupils return from the Easter holidays in three weeks.

Tributes left on Facebook to Keane included: "Sleep tight beautiful," while another message reads: "No child should go to school and not return home, RIP Keane Grace Wallis-Bennett. Horrible news."

A bunch of flowers left under the school entrance sign had a message which read: "Rest in peace Keane. God has gained another angel."

A number of parents congregated at the school gates after news of the tragedy emerged and they began collecting their children from the premises from around 12.30pm.

Many pupils were seen leaving the school, covering their faces with scarves and jackets.

The incident comes just weeks after Edinburgh City Council was fined for an incident at the same school in which a girl was seriously injured when she fell down a broken-down lift shaft.

Superintendent Matt Richards said: "Inquiries now continue with partners from the Health and Safety Executive, and also alongside the council to make sure we get to the bottom of what has happened.

"It would be wrong to speculate about that at the moment. What I will say obviously is that our thoughts and prayers are with the family, and in particular with the school children today and hopefully they can get back to school as soon as possible."

Asked whether the council was aware of any concerns about the wall before today's incident, Andy Gray, head of schools and community services, said: "We are not aware of that at this stage. We are working with the police and the Health and Safety Executive to really find out thoroughly what has happened today."

The council later added: "A full survey of all our schools, including Liberton High School, was carried out in 2012/13 and no concerns with this wall were identified.

"However, as a precaution, specialist council building services staff will be surveying all similar walls in schools where we know that they exist. The survey work will begin early tomorrow.

"As a further precaution, a full survey will be carried out on Liberton High School in the coming days before the main school building re-opens to pupils. Support for all pupils, plus tutorial support for S4 to S6 pupils, will be available in the school's new games hall for the rest of this week."

The latest incident is the second tragedy to hit the school in recent months.

Jamie Skinner, 13, a pupil at Liberton High School, died after collapsing on a football pitch while playing for Tynecastle FC at the end of last year.

Edinburgh City Council was fined £8,000 in February after a girl at the school was seriously injured when she fell more than 16ft as teachers tried to free her from the lift.

The schoolgirl, then aged 15, suffered three fractured vertebrae, bruising over her lower back and a sprained wrist as a result of the fall in December 2011.

The school is in the south of Edinburgh and has 65 staff and 650 pupils.

Shailesh Shrestha travelled to the school to collect his son when he heard the news.

He said: ''I was in a meeting when I heard what had happened and have come in to collect my son.

''It is concerning that this has happened. You just don't expect this kind of thing to happen inside a school.''

Community figures and politicians voiced their shock and sadness in the wake of the death.

First Minister Alex Salmond visited the school in December for a talk by astronaut Chris Hadfield.

Mr Salmond told BBC Scotland: "It's really tragic circumstances and my heart goes out to the family and friends.

"A proper investigation will takes its course. Yes, there was another incident in the school but at first sighting it doesn't seem related to this tragic occurrence.

"But these things will be properly investigated by the council in the first instance, and then, if judged by the Crown Office, in a fatal accident inquiry, so there will be a rigorous investigation of the circumstances, but this is not the moment to speculate on cause, this is about expressing condolences in these tragic circumstances and the appalling accident that has befallen a young girl at school."

Councillor Nick Cook, who represents the Liberton/Gilmerton ward, said: "It's tragic and troubling news out of Liberton High School.

"Our thoughts are first and foremost with the family. But serious questions need to be asked as to how this incident managed to come about."

The Church of Scotland's associate minister at Liberton Kirk, the Rev Dave Rankin, is one of the chaplains at the school.

He said: "Members of the chaplaincy team at Liberton High School went to the school as soon as we became aware of this terrible accident.

"Our thoughts and prayers are with the family of the girl who has died. Ministers and youth workers from a number of local churches were on hand to support both pupils and members of staff as they heard what had happened."

The school will remain closed for the rest of this week, except for any pupils seeking emotional support or for S4-6 pupils studying for forthcoming exams.