William Cornick, then aged 15, murdered Ann Maguire, 61, in April in what was believed to be the first killing of a British teacher by a student in almost 20 years, sending shockwaves around the country where violent school incidents are rare.
"This tragic case has shocked the nation," said Peter Mann, head of the complex casework unit at the regional prosecution office. He said the teenager had shown no remorse at all for what he had done.
"While his deep-seated hatred for Ann appears incomprehensible, we are clear that he calmly and methodically planned this cold-blooded attack on her."
Leeds Crown Court heard Cornick, now 16, had long planned the attack on Maguire, a popular teacher at Corpus Christi Catholic College in the city, about 175 miles (280 km) north of London. During a lesson, he repeatedly stabbed her in front of about 30 traumatised pupils with a kitchen knife.
After the attack, he sat back down next to his classmate and said out loud "good times".
The court was told he was the son of "responsible and caring parents", but friends felt his personality had become disturbed as he got older.
After the murder he told one psychiatrist: "It's kill or be killed. I did not have a choice. It was kill her or suicide".
Asked about the impact on Maguire's family, he said: "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."
Cornick was told he would spend a minimum of 20 years behind bars after he pleaded guilty to murder.
"There can be no doubt that the defendant is highly dangerous," said the judge Peter Coulson.
Maguire, a mother of two, taught Spanish and religious education, and had worked at the school for nearly 40 years. She had been due to retire in the summer.
Although there has been growing concern about knife attacks involving teenagers in Britain, violence inside schools is uncommon.
"Thankfully this is an isolated occurrence which should not be seen as an indicator of any serious violent crime issues within Corpus Christi college or any other schools in Leeds," local commander Superintendent Paul Money told reporters.
Maguire was believed to be the first school teacher to be killed by a student since Philip Lawrence, a London headmaster, was stabbed at the gates of his senior school in 1995.
The worst-ever attack on a school in Britain was at the Dunblane Primary School in Scotland in March 1996 when Thomas Hamilton, 43, entered the school armed with four handguns, killing 16 children and one adult before committing suicide.