The First Minister has spoken of her "shock and sadness" over the fatal stabbing of Bailey Gwynne as she gave an assurance over safety in Scotland's schools.
Nicola Sturgeon said the thoughts of MSPs at Holyrood were with the 16-year-old's loved ones and those affected by the tragedy.
She also stressed that incidents such as the one at Aberdeen's Cults Academy were "extremely rare in our schools" and pledged the Scottish Government would make sure that any lessons which needed to be learnt would be learnt.
The First Minister made the comments during an exchange with Kezia Dugdale at Holyrood, in which the Scottish Labour leader described the fatal incident as "every parent's worst nightmare".
Ms Sturgeon told MSPs: "May I begin today by expressing my shock and sadness at the incident which occurred yesterday at Cults Academy in Aberdeen.
"I also want to convey my deepest sympathy and condolences to the family and friends of Bailey Gwynne, who tragically died in the incident.
"While the circumstances of this young man's death are subject to ongoing and thorough police investigation, I'm sure that the whole chamber will want all those who loved Bailey, and indeed all those at the school who have been affected by this tragedy, to know that our thoughts are very much with them at this desperately sad time."
Ms Dugdale also said the thoughts and prayers of MSPs were with the teenager's family and offered support to the parents, pupils and staff at the school.
During First Minister's Questions, she said: "There are countless families across the country who will feel this pain and sorrow today.
"It's every parent's worst nightmare, sending a child off to school in the morning only for them never to return home again.
"Can the First Minister reassure parents right across the country that everything that can be done is being done to keep our children safe?"
The SNP leader replied: "Yes, indeed, of course, I can and should give that assurance."
Ms Sturgeon went on: "Incidents like this are deeply shocking and deeply tragic, and the impact on the lives of those who knew and loved Bailey Gwynne are impossible for any of us to imagine.
"Notwithstanding that, it is also important to remember and to remind ourselves that tragic incidents like this one are thankfully extremely rare in our schools. That does not, of course take away at all from the tragic nature of this incident.
"The Scottish Government will, in the fullness of time, make sure that any lessons that require to be learnt from this incident are learnt."
She added that incidents of young people possessing knives and dangerous weapons are on the decline but said it was "no reason for complacency".
Conservative leader Ruth Davidson and Scottish Liberal Democrat leader Wille Rennie also said their thoughts were with those touched by the tragedy.
Ms Davidson told MSPs: "Can I add the condolences of myself and my party to those that have already been expressed by the First Minister and the whole Parliament to the family and loved ones of Bailey Gwynne."
Mr Rennie added: "I'm sure we all appreciate the way that the community has rallied round in Aberdeen following the horrific circumstances at Cults Academy."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here