A 16-year-old boy has been found guilty of the culpable homicide of Aberdeen schoolboy Bailey Gwynne.

The jury of seven men and eight women took less than two hours to reach a majority verdict after hearing five days of evidence at the high court in Aberdeen. It including testimony from four teenage witnesses who described how a disagreement over a biscuit swiftly escalated into a physical confrontation that resulted in Bailey being fatally stabbed.

The judge, Lady Stacey, had told the jurors that the question they must consider was whether the accused was guilty of murder or the lesser charge of culpable homicide, which is roughly equivalent to manslaughter in English law.

As the verdict was announced, the accused turned and gave a weak smile to his father, who had attended every day of the trial. Bailey’s parents and other family members left the court without making any comment.

Responding for the crown, Alex Prentice QC reminded Stacey that Bailey Gwynne lived with his family, including four brothers aged from 18 months to eight years at the time of his death, and asked her to consider

victim impact statements submitted by his mother and grandmother.

Ian Duguid QC, for the defence, said the verdict offered “no consolation for either side. Two families have been destroyed by these events.”

Bailey, also 16, was attacked at Cults Academy, one of Scotland’s highest performing state schools, on 28 October 2015. He was rushed to hospital but died of his injuries at Aberdeen Royal infirmary.

Flowers outside Cults Academy after the stabbing. Photograph: Andrew Milligan/PA

The killer, who cannot be named for legal reasons, told police that the knife he used to kill the schoolboy was purchased on Amazon and he took it to school every day in the weeks leading up to the killing, because he had put it in his blazer pocket to show friends and forgotten it was there.

One witness, also 16, described how “name-calling” over Bailey’s refusal to give a biscuit to another boy in a group of year five pupils who had congregated in a school corridor at the end of the lunch hour had quickly developed into a physical altercation.

The witness, who said he was friendly with both boys, struggled to relate the precise details of the events leading up to the stabbing. He gave evidence from his seat in the witness box after sobbing as he recalled the moment he saw the accused stab Bailey “in the tummy area”.

Another schoolboy witness described the exchange of insults: “Bailey called [the killer] a fat cunt first and then [the killer] said to Bailey: ‘Your mum’s a fat bitch’, which really upset him.”

Bailey then confronted his killer. The witness added: “[The killer] pushed him back and they both started fighting. Bailey had [the killer] in a headlock and [the killer] was trying to get out of it and Bailey just kept hitting him against the wall.”

Summing up the crown’s argument, Prentice said the case demonstrated the dangers of carrying a knife. “If you have a knife you have the ability to use it,” he said.

Prentice said he did not suggest the killer had set off for school that morning intending to kill Bailey, but added: “If he had not been carrying a knife the outcome of the conflict would have been a few bruises and perhaps a fat lip.”

Duguid had cautioned the jury not to be “blinded by a prejudice for people who carry knives”.

“Ultimately, what this case is about is the quality of the actions of two individuals over a 30-second period. The accused displayed extraordinary stupidity in having a weapon with him. Bailey Gwynne displayed recklessness in setting about a fellow pupil.”

Headteacher Anna Muirhead. Photograph: Andrew Milligan/PA

Giving evidence on the first day of the trial, the school’s headteacher, Anna Muirhead, recounted how the 16-year-old became distraught as Bailey lay dying in the school corridor, telling her: “That was my fault,” as they waited for the ambulance to arrive.

Muirhead told the jury: “He was sitting side on to the seat and slightly curled up. He was obviously distraught or upset. I said to him: ‘What’s up?’. He indicated with his head and his hand round the corner: ‘That was me, that was my fault’.”

The court heard that Bailey had died from a wound that penetrated from 3.5-4cm between his ribs and into the left ventricle of his heart, which caused immediate and catastrophic blood loss.

During the trial, the jury was allowed to examine a folding knife with an 8cm blade that was recovered by crime scene officers from a waste bin near the school’s toilets.

The jury was told to find the defendant guilty of two other charges: possession of knives or “bladed instruments”, and possession of two knuckledusters, at a school “without reasonable excuse or lawful authority”. These two offences were alleged to have occurred on various occasions between 1 August 2013 and the day of the killing.

He told police officers interviewing him the day after Bailey died that he carried the weapon in order to appear cool. “I’ve never fitted in so I was just trying to look cool, act confident, act tough, but I wasn’t,” he said.

Bailey’s stepfather John Henderson. Photograph: Andrew Milligan/PA

Reacting to the verdict, DS David McLaren, who led the investigation, said: “Whilst the circumstances around Bailey being killed were relatively uncomplicated, it is still difficult to comprehend that he died at school at the hands of a fellow pupil.

“It is the senseless decision to take a knife into a school setting that undoubtedly led to Bailey’s death.”

Bailey had lived in the village of Maryculter, a few miles from the school, with his mother, her partner and his four younger half-brothers. His funeral was held at Maryculter parish church, a short walk from the family home, which overlooks the open field where Bailey and local children played together.