A 16-year-old boy has pleaded guilty to stabbing a teacher to death in front of a horrified class in Leeds.

The boy, who cannot be named, admitted murdering Ann Maguire, 61, in her classroom at Corpus Christi Catholic college on 28 April this year. Her family were in Leeds crown court to hear his plea.

The youngster was 15 and studying for his GCSEs at the time of the attack. His parents sat with him in the dock at Leeds crown court as he admitted the killing. The prosecution has argued that the boy should receive a minimum 12-year tariff because he “derived pleasure from the public nature of her killing”.

Maguire’s daughter Emma told the court, “Every morning I wake up hoping it’s all a bad dream. There’s a split second before reality sets in.” Maguire’s husband, Don, said: “There will be no closure. Balance will never return. There will be no level scales.”

The court heard that Maguire was the boy’s Spanish teacher. The boy was a model pupil in year 7, was “amicable, enthusiastic and conscientious” but changed after being diagnosed with diabetes. The diabetes had a major impact on his mood and personality. His mother noticed evidence of self-harming.

He was upset that his diabetes would prevent him from joining the army. He started to harbour a hatred for Ann Maguire, the court heard.

The boy told other pupils he had been carrying a knife and wanted Maguire dead: on his mobile police discovered many images of knives. On Christmas eve 2013 the boy told a friend on Facebook he wanted to “brutally kill” Maguire and spend the rest of his life in jail.

The boy told one friend he planned to kill two other teachers as well as Maguire – one was young and pregnant.

On the day of the murder the boy took knives to school and a bottle of Jack Daniel’s whisky in order to “celebrate afterwards”.

The attack took place at Maguire’s desk. The boy was in her Spanish lesson. He told a pupil of his plan and winked as he left to kill her.

He attacked Maguire from behind, the court heard. She was 5ft 2in: a foot shorter than her killer. He was expressionless as he stabbed her in the neck and back.

After stabbing Maguire and chasing her out of the classroom the boy calmly returned to his desk and, according to witnesses, said: “Pity she didn’t die.”

The court then heard harrowing video testimony from pupils who witnessed the attack. “I was in absolute panic,” said one classmate.

Susan Francis, a colleague of Maguire’s, heard screaming. She rushed into the corridor and was confronted by pupils running, screaming. Maguire was holding her neck and said “he’s stabbed me in the neck”. The boy followed her. The teacher pushed Maguire into another classroom. The other teacher held her foot against the door to stop the boy entering. She could see his “emotionless” face through the door window. Francis sat with Maguire comforting her and telling her she was loved.

The boy returned to his seat after the murder and said “good times”, according to witnesses. He spoke of an adrenalin rush. One pupil said it appeared that he was pleased with what he had done.

Two teachers entered the room and the boy put his hands in the air as if in surrender. He told them of “other naughty stuff” in his bag. When police arrived they were struck by his “calmness and air of normality”. He chatted with officers about their hobbies, the court heard.

The boy told a psychiatrist he killed Maguire because “life is pretty fucking shit” and that he had planned a triple homicide. He said he did not regret his actions and was pleased to have killed Maguire but “it didn’t live up to” his expectations.

He later 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.”

A paramedic with 30 years experience said Maguire’s wounds were the worst she’d ever seen. All were inflicted from behind.

Paul Greaney QC, prosecuting, told the court the boy’s parents were “at a loss to understand how and why their son has turned out as he has”.

The boy’s parents, who are divorced, have refused requests for interviews. They have asked for privacy to come to terms with what their son has done.

At an earlier court hearing in July the boy accepted responsibility for unlawfully killing Maguire, but stopped short of admitting he had murdered her. Following this admission, the judge ordered a series of psychiatric assessments, which concluded that he was of sound mind when he was carrying out the attack. That conclusion meant he was deemed fit to stand trial for her murder.

Since his arrest at the school he has been remanded in youth custody. He has not spoken in court, other than to give his name and date of birth and indicate he understood proceedings.

The boy is the first secondary school pupil to have ever murdered a teacher in a British classroom. He was restrained after the attack by other teachers in the top-floor languages block as his victim lay seriously injured. Maguire was taken by ambulance to Leeds General Infirmary but died around an hour after being admitted.

A postmortem established the cause of death as shock and haemorrhage. “Although there were a number of stab wounds, a stab wound to her neck had severed her jugular vein and was the fatal injury,” pathologist Brian Roger told a coroner earlier this year.

Maguire, originally from Wigan, had taught at Corpus Christi for more than 40 years after arriving as a student teacher. She was described as “the mother of the school”, and had taught thousands of students during her career, may of whom left flowers and tributes at the school gates after her murder. Some were written in Spanish, the language she had taught for so long.

Her motto was: “You can never put a limit on a child’s potential.” A permanent memorial to her is now attached to the school railings. It includes a letter of condolence from the Archbishop of Westminster, as well as letters from former pupils. One boy thanks her for believing in him; another, written in a child-like script addressed to the Holy Mary, asks that she be kept safe in heaven.

This year, Maguire had moved to working four days a week ahead of her planned retirement.

She was not meant to be teaching on the day of her killing but had come into school on her day off to help pupils prepare for their forthcoming exams.

She lived in Leeds with her husband, Don, a former maths teacher and landscape gardener, with whom she had two grown-up daughters, Kerry and Emma. Her sister’s two sons, Daniel and Andrew, came to live with the family after their mother died in 1986. She thought of them as her sons, and they called her mum.

The Ann Maguire Arts Education Fund has been set up in her memory and is accepting donations. The fund will provide bursaries and funding for the enhancement and personal development of young people under 18 years old through music, drama, language and dance.