A teenager who stabbed a school pupil to death with a knife he bought online has been locked up for nine years.
Bailey Gwynne, 16, was attacked after a "silly argument" at Cults Academy in Aberdeen on October 28 last year.
His killer, a 16-year-old youth, was detained for nine years by a judge at the High Court in Edinburgh after he was found guilty of culpable homicide and carrying weapons.
Lady Stacey said the argument that led to Bailey's death would have resulted in a "fist fight at worst" had the teenager, who cannot be named for legal reasons, not chosen to carry the 8.5cm blade in his pocket.
She said: "I wish to make clear to you and anyone else who is ever tempted to carry a knife that the courts will regard that as a very serious matter.
"It is obvious that buying the knife ... is what started the terrible course of events that led to Bailey losing his life.
"If you had not carried a knife, the exchange of insults between you and Bailey would have led at the worst to a fist fight in which there would probably have been no serious injury and almost certainly no loss of life."
Bailey, a fifth-year pupil with four younger brothers, died from bleeding caused by a single stab wound to the heart during a fight in his lunch hour.
His mother Kate Gwynne said after the trial: "Nothing will give us back what has been taken and the only thing that we truly want.
''Our sweet boy with a big dream working hard to make it happen.
"A boy who was never happier than when chilling out with his friends and his dog after a session in the gym."
The youth denied murdering Bailey and was convicted of the lesser charge of culpable homicide following a five-day trial at the High Court in Aberdeen last month.
The jury heard Bailey squared up to the offender after a remark about his mother and he pulled out a knife he told police he bought online and carried "to look cool".
He said he was able to purchase the weapon without proving his age and arrange to have it delivered to the home he shared with his mother without her knowing.
The youth's lawyer, Ian Duguid QC, said the "profoundly sorry" youth realised he would spend the rest of his life paying for the consequences of what began as a "silly argument".
He is receiving treatment for symptoms of post traumatic stress disorder including nightmares, anxiety and depression, the court heard.
Mr Duguid said: "This case has tragedy written right over it."
Lady Stacey said the teenager, who has no record of violent offending, must serve nine years in custody - eight for culpable homicide and one for carrying weapons. He will then be supervised for a further two years on release.
She said: "Nothing that I can say nor any sentence that I impose will do anything to lessen the grief that Bailey Gwynne's family and friends feel.
"The shock of his death at such a young age was felt in the wider community and nothing I can say or do can alleviate that."
Aberdeen City Council said it is carrying out a review into the schoolboy's death to identify any lessons that can be learned.