A 15-year-old boy has been arrested after a long-serving teacher was repeatedly stabbed to death at a school in front of her pupils.

Tributes have been paid to 61-year-old Anne Maguire, who was fatally injured at Corpus Christi Catholic College in Leeds. The Spanish and religious education teacher had been at the school for more than 40 years.

West Yorkshire Police detectives said the arrested boy was in custody.

Chief Superintendent Paul Money said teachers at the school held the boy until police arrived, shortly before midday. The teacher died later in hospital.

He said: "The alarm was raised by students in the school, some of whom witnessed the offence."

Mr Money said a knife had been recovered and added: "There were a number of stab wounds to the lady."

Prime Minister David Cameron joined current and former pupils in paying tribute to a "legend" teacher, described by many as a "mother figure" at the school.

Mr Cameron said: "My thoughts are with the family of Anne Maguire, as well as the staff and pupils of Corpus Christi school."

Labour leader Ed Miliband said: "The killing of Anne Maguire was an appalling act. My thoughts are with her family, the school and those pupils who witnessed the attack."

Teaching unions described the incident as "awful" and "appalling", and pledged their support.

Leeds City Council said it was working closely with the police and helping with their investigation.

A collection of flowers has already begun to build outside the school gate. One message read: "To a special teacher. I will never forget you."

Former pupil Kerrianne Ayward said: "She was just lovely. She was helpful and caring and you could have a laugh with her.

"She was always there for you, even if she didn't know you very well. No one had a bad word for her - I mean no one."

Kerrianne, 17, who left the school two years ago, said: "She has been my referee for everything, college, everything.

"There was no-one else you would go to who was better. She was the heart of the school."

Another former pupil, Peter Masefield, 18, said: "I just can't understand why her. Of all people. She was the school's figurehead."

Pupil Georgina Kilroy, 16, said: "I don't know anyone who didn't like her. She was spot on. You couldn't ask for a better teacher."

Georgina said her teacher broke down when she told the children the news. She said that before then they were told a teacher had gone to hospital but lessons continued.

Laying flowers, former pupil Aine Arnold, 17, said: "It's more like losing a family member than losing a teacher.

"As long as we were happy, she was happy. She would do anything for you. She helped me a lot. She is going to be such a loss to the school. Hers were one of those lessons you didn't want to miss.

"She was just lovely. She was wonderful. I am devastated."

There are nearly 1000 pupils on the school roll aged between 11 and 16. It is a specialist technology college and is consistently oversubscribed.

Figures published last week revealed that almost 1000 schoolchildren have been caught with potentially deadly weapons including guns, knives, axes and hammers in just three years.

Teaching unions have repeatedly warned staff are facing a rising tide of violence in the classroom.

Hilary Benn, Labour MP for Leeds Central, described yesterday's tragedy as "profoundly saddening" but said he was not in favour of stringent security measures that would keep staff and pupils "behind high fences". He said: "This is not representative of the college, of the community that surrounds it, the families that send their children to school and the city itself. But it is profoundly saddening. Schools are places of learning.

"We want our schools to be open - we don't want to lock pupils and staff behind high fences."