A 16-year-old boy has been sentenced to life with a minimum term of 20 years for murdering popular teacher Ann Maguire, but was warned by a judge that he may never be released.
Mr Justice Coulson said the teenager showed a "total and chilling lack of remorse" after he stabbed Mrs Maguire, 61, seven times as she taught a class at Corpus Christi Catholic College in Leeds in April, when he was 15.
In an attack that shocked the nation, he chased Mrs Maguire, "stabbing her as she sought to escape", Leeds Crown Court heard.
The judge set the 20-year tariff - the minimum time the boy must serve in custody before he is released - but added that, having read about him, "it's quite possible that day may never come".
He said the teenager's pride in what he did and lack of remorse was "truly grotesque".
The teenager remained seated while Mr Justice Coulson read his sentencing remarks.
He then stood and looked at the judge, with his head tilted to one side, as the sentence was passed. His expression did not change.
He did not appear to look at his parents, who were both visibly upset, as he was led from the dock.
The boy, who the court heard came from came from a loving and supportive family, also spoke of attacking other school staff, including a pregnant woman "so as to kill her unborn child".
The teenager, who winked at a fellow pupil before launching his assault, stabbed Mrs Maguire, 61, seven times as she taught a class at Corpus Christi Catholic College in Leeds in April, when he was 15.
Outlining the case, prosecutor Paul Greaney QC said: "It is important that we should record that it is clear from the evidence that the parents of (the boy) are decent people and responsible parents. They are at a loss to understand how and why their son has turned out as he has and they have co-operated fully with the police and with the prosecution.
"It follows that this is not one of those cases in which a defendant's actions may find a degree of explanation in his family circumstances.
"On the contrary, (the boy's) family life was marked by love and support."
Mr Greaney added that that made the defendant's actions "all the more inexplicable".
He said the boy was in Mrs Maguire's Spanish class and his academic reports "had generally been positive".
He said there was nothing to indicate to the boy's parents or teachers a risk of "homicidal violence".
But, he said, pupils noticed disturbing aspects to his personality.
The boy told other children that he hated Mrs Maguire and wanted her dead.
The prosecutor said: "Late on the night of Christmas Eve 2013 and into the early hours of Christmas Day, the defendant exchanged messages with a friend on Facebook.
"In those messages he spoke of 'brutally killing' Mrs Maguire and spending the rest of his life in jail so as not to have to worry about life or money."
Two months before the murder, the boy sent a message on Facebook which said of Mrs Maguire: "The one absolute f****** bitch that deserves more than death, more than pain and more than anything that we can understand."
The boy told a psychiatrist how he planned the murder.
The prosecutor said he took a bottle of whisky to school to celebrate after the attack.
Mr Greaney told the court that the defendant said to the expert: "I decided on Sunday it was going to be a knife. I thought I was just going to go to school and wait for her lesson and do it.
"I wanted to get caught. That's why I did it in school. I wanted to be in jail."
Mr Greaney said the boy told other pupils he was going to attack Mrs Maguire on the morning of the murder.
The boy showed some of them the knives he had with him.
Mr Greaney said the boy left a room next to where Mrs Maguire was teaching and winked at a fellow student before going to attack her.
There was no expression on the boy's face as he stabbed her, one pupil said.
Mr Greaney said: "Mrs Maguire was at her desk helping pupils.
"She was leaning over, looking at the work of a girl..."
He went on: "The defendant approached his teacher and began to stab her in the neck and back.
"He attacked her from behind.
"Ann Maguire was 61 years of age, 5ft 2in in height and of slim build.
"The defendant was a full foot taller and was armed with a large kitchen knife.
"To describe his attack as cowardly hardly does it justice."
The prosecutor said Mrs Maguire fled but she was chased by the boy "stabbing her as she sought to escape".
Mr Greaney said the boy had earlier told pupils he wanted to attack other teachers, including a pregnant woman "so as to kill her unborn child".
Mr Greaney said Mrs Maguire's friend and colleague, Susan Francis, heard screaming and rushed into the corridor where she found children "screaming in panic".
He said Mrs Maguire ran towards her, holding her neck and saying: "He's stabbed me in the neck."
The defendant, he said, then came after her, "in effect chasing her".
Mrs Francis pushed her friend into a workroom and held her foot against the door to keep the boy out.
Mr Greaney said: "She was able to see (the boy) through a glass panel in the door. His face was emotionless and he then walked away."
He said: "The bravery and decency of Susan Francis during this period stand in the starkest contrast to the conduct of (the boy)."
Mrs Maguire was stabbed seven times to her upper back and neck, Mr Greaney said.
The main wound was to her jugular vein.
He said a paramedic who attended later said the stab wounds were the worst he had ever seen.
The prosecutor said the boy went back to the classroom and sat down "as if nothing had happened".
He said: "He sat down beside ... as if nothing has happened and said that he had stabbed Mrs Maguire. He added that it was a pity she was not dead.
"He said to the entire class 'good times' and spoke of an adrenalin rush."
Mr Greaney said one girl remarked it was obvious "that he was pleased with what he had done".
Mr Greaney said: "Undoubtedly, one of the most disturbing aspects of an extremely disturbing case is that (the boy) not only lacks remorse but is proud of what he did in killing Mrs Maguire, who he at one stage described to (a psychiatrist) as barely human."
He said the defendant told a psychiatrist: "I wasn't in shock, I was happy.
"I had a sense of pride. I still do.
"I know it's uncivilised but I know it's incredibly instinctual and human. Past generations of life, killing is a route of survival.
"It's kill or be killed. I did not have a choice. It was kill her or suicide."
He said that when the expert asked about the impact on Mrs Maguire's family, the boy replied "I couldn't give a s***" and added: "I know the victim's family will be upset but I don't care. In my eyes, everything I've done is fine and dandy."
Mr Greaney outlined the psychiatric reports that had been prepared on the boy.
He said: "In short, the defendant is currently highly dangerous and has psychopathic elements to his personality."
He quoted the lead psychiatrist, saying: "There will be a problem in assessing him in the future, partly because of his intellectual abilities but mainly because, although he was hostile to those in authority, they were least able to detect anything that would herald this offence."
The prosecutor added: "That his anger and hatred in fact became focused upon a person as decent and loved as Ann Maguire only makes this case the more tragic and goes to explain the outpouring of grief that there has been within the school and within the community."
The defendant, wearing a grey suit and tie, stood flanked by two prison officers in the dock as the court clerk read out the charge.
He looked straight ahead and showed no emotion as he pleaded guilty to murdering Mrs Maguire.
Mrs Maguire's family sat in an area of the courtroom normally reserved for court officials.
Video statements from pupils who witnessed the attack were shown to the court.
As the students described what happened, Mrs Maguire's husband, Don, shook his head. Other family members wiped tears from their eyes and looked over at the defendant in the dock.
Mrs Maguire's daughter, Kerry, covered her face with her hands as Mr Greaney described how a friend and colleague had comforted her mother as she lay dying.
Mr Greaney said: "The murder was committed in public in front of many young people. The damage to those children remains to be seen but it is not difficult to imagine.
"The court would be entitled to conclude that the defendant derived pleasure from the public nature of the killing."
He added: "The prosecution does not accept that this defendant's psychiatric make-up affords any mitigation.
"He has an adjustment disorder with psychopathic tendencies. That does not reduce his culpability."
Richard Wright QC, mitigating, told the judge that this was "a sentencing exercise without parallel" and added: "In the UK at least - an offence without precedent."
He said the boy gave "no sign to anybody of what was to come".
"Plainly, these were the actions of a deeply disturbed young man," he added.
After the hearing, Peter Mann, of the Crown Prosecution Service, said: "While his deep-seated hatred for Ann appears incomprehensible, we are clear that he calmly and methodically planned this cold-blooded attack on her.
"He attacked Ann while she was helping children with their work and completely unable to protect herself. He has continued to show no remorse whatsoever."