The girl, Deborah Yakubu, was surrounded and attacked by fellow students on Thursday, police said in a statement.
The incident happened at Shehu Shagari School in Sokoto, north-western Nigeria, and the school was immediately shut down.
“Students forcibly removed the victim from the security room where she was hidden by the school authorities, killed her and burned the building,” police spokesman Sanusi Abubakar said in a statement released to CNN.
Sokoto State Governor Aminu Tambuwal ordered the school closed and instructed the Ministry of Higher Education and Security Services to investigate the incident.
Video circulated on social media after the murder appears to show her attackers holding a box of matches and celebrating after lighting it.
CNN was unable to independently verify the video.
Two people were arrested and “The suspects in the viral video on Twitter have been spotted and will soon be pinned,” Abubakar added.
Nigerians took to Twitter to express their outrage and denounced the killing. TThere are fears this could increase sectarian tensions in the country, which is largely divided along religious lines, with the north being majority Muslim and the predominantly predominantly Christian.
“Unfortunately, this kind of indiscriminate murder of people in the name of revenge for ‘blasphemy’ has been going on in the North for far too long. This has to stop!” he said. “The monsters in this video are easy to identify. The Sokoto state government must arrest them immediately 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 authorities to punish the attackers.
Reverend Matthew Kukah of 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 run its course.”
Kola Alapinni, a lawyer who has defended blasphemy accused in Nigerian courts, said he was working on the appeal of another man sentenced to death for blasphemy when he learned of 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 is hiding under a section of its Sharia law that punishes inflammatory or offensive language directed at Prophet Muhammad. That needs to be examined before the Court of Appeal or even the Supreme Court.”
“The main task of the state is the safety of life and property. And here it failed. The Nigerian government’s seriousness in ending this threat will be gauged by the state’s response in prosecuting those responsible for this murder,” added Alapinni.
The incident comes at the start of the campaign season for next year’s presidential election – the primaries are scheduled for later this month.
The opposition party’s presidential candidate, Atiku Abubakar, has been criticized for deleting social media posts condemning the killing after Muslim supporters vowed not to vote for him.
CNN has come forward his spokesman for comment.
There have been previous cases of mobs attacking people for alleged blasphemy in Nigeria. One of the most notable cases was during the Miss World 2002 pageant, which was supposed to be held in Nigeria but was postponed after violent protests that left 100 people dead.
Riots broke out when ThisDay newspaper published an article about the pageant that was seen as an insult to Muslims. Supporting the pageant against Muslim criticism, the article said that if the Prophet Muhammad were alive, he would consider marrying one of the candidates.
The newspaper’s offices in Kaduna were burned down and there were reports of churches and mosques being set on fire.