The girl, Deborah Yakubu, was surrounded by fellow students and attacked on Thursday, a police statement said.
The incident happened at the Shehu Shagari school in Sokoto, northwestern Nigeria, and the school was immediately closed.
“Students forcefully removed the victim from the security room where she was hidden by the school authorities, killed her and burned the building,” police spokesperson Sanusi Abubakar said in a statement released to CNN.
Sokoto state’s Governor Aminu Tambuwal issued an order to close the school and directed the Ministry of Higher Education and security agencies to investigate the incident.
The video, which circulated on social media in the aftermath of the killing, appears to show her attackers holding a matchbox and celebrating after setting her alight.
CNN has not been able to independently verify the video.
Two people have been arrested and “the suspects in the viral video on Twitter were spotted and will be nailed soon,” Abubakar added.
Nigerians have expressed their outrage on Twitter and denounced the killing. There are fears it could heighten sectarian tensions in the country, which is largely split along religious lines, with the north majority Muslim and the largely largely Christian.
“Sadly, this sort of consequence-free murder of people in the name of avenging ‘blasphemy’ has been going on for far too long in the North. This must stop!” he said. “The monsters in that video are easily identifiable. The Sokoto State government must immediately apprehend them and make an example of them. If that doesn’t happen, this kind of murderous barbarism will continue.”
Community leaders have called for calm and urged authorities to punish the attackers.
Reverend Matthew Kukah of the Sokoto diocese said in a statement: “This has nothing to do with religion. Christians have lived peacefully with their Muslim neighbors here in Sokoto over the years …The law must take its course.”
Kola Alapinni, a lawyer who has defended those accused of blasphemy in Nigerian courts, said he was working on the appeal of another man sentenced to death for blasphemy when he heard about Yakubu’s killing.
He told CNN that blasphemy does not exist under Nigeria’s constitutional laws, although some northern Muslim states recognize it under Sharia law.
“The State government hides under a section of its Sharia laws that punishes inciteful statements or insulting statements to Prophet Muhammad. It needs to be tested at the Appeal Court or even at the Supreme Court.”
“The primary job of the State is the security of lives and property. And here, it has failed. The seriousness of the Nigerian government in ending this threat will be measured by the response of the State in prosecuting those responsible for this murder,” Alapinni added.
The incident comes as campaign season for next year’s presidential election gets underway — primaries are scheduled for later this month.
Opposition party presidential hopeful Atiku Abubakar attracted criticism for deleting social media posts condemning the killing after Muslim supporters vowed not to vote for him.
CNN has reached out to his spokesperson for comment.
There have been previous incidents of mobs attacking people for alleged blasphemy in Nigeria. One of the most notable cases was during the 2002 Miss World competition, which was due to be held in Nigeria but was moved after violent protests in which 100 people died.
Rioting broke out over the newspaper ThisDay published an article about the pageant which was deemed insulting to Muslims. The article supported the pageant against Muslim criticism, saying that if the Prophet Mohammed were alive, he would consider marrying one of the contestants.
The newspaper’s offices in Kaduna were burned down and there were reports of churches and mosques being torched.