A 16-year-old boy has pleaded guilty to murdering teacher Ann Maguire.

The teenager stabbed Mrs Maguire, 61, as she taught a class at Corpus Christi Catholic College, in Leeds, in April, when he was 15.

He admitted murder when he appeared at Leeds Crown Court today.

Prosecutor Paul Greaney QC told the court: "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".

Mr Greaney 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."

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 admitted murdering Mrs Maguire.

The teenager's parents sat at the back of the dock and listened intently to the details of their son's crime.

Mrs Maguire's family sat in an area of the courtroom normally reserved for court officials, while the large public gallery was packed with members of the press.

Due to the young age of the defendant, the judge and barristers did not wear their wigs and gowns during the hearing.

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 brought a bottle of whisky to school to celebrate after the attack.

Mr Greaney told the court how 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, according to the prosecutor.

Mr Greaney said: "Mrs Maguire was at her desk helping pupils.

"She was leaning over, looking at the work of a girl called .....

"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 2inches 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 friend 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 work room 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 had been stabbed seven times to her upper back and neck, Mr Greaney said.

The main wound was to her jugular vein.

He said the 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 had 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."