The teacher, a Christian, was attacked after supervising an exam in Gombe city. It is not clear what she had done to anger the students.

The authorities, concerned that communal unrest could break out, have ordered all the city's schools to shut.

Similar accusations sparked riots in neighbouring Bauchi State last year.

At least 15,000 people have been killed in religious, communal or political violence since the country returned to civilian rule in 1999.

'Restored calm'

Nigerian police say students beat the teacher to death outside the school compound after she had been invigilating an exam.

The students had apparently accused her of desecrating the Koran, though it is not clear exactly what she had done.

The police arrived at the scene to restore calm and say their intervention stopped a riot.

The BBC's Alex Last in Lagos says violence based on such accusations is not new.

Last year, in Bauchi State, a rumour swept the city that a Christian teacher had also desecrated the Koran, which prompted riots in which at least five people were killed.

In fact, the teacher had confiscated the Koran from a pupil who was reading it in class.

Religious differences have long been used to justify all kinds of violence in Nigeria, our reporter says.

In reality it is often fuelled by ethnic or political conflicts and competition for resources, which can be fierce, given that so many people live in poverty, he says.