Abdullahi Sallau said a Muslim mob killed one person on Sunday and three yesterday in the town of Pandogari in Niger state "following blasphemous remarks by a Christian against the Prophet".
One of those killed was Methodus Chimaije Emmanuel, the 24-year-old who posted comments on his Facebook page, said Sallau, who lives in the town. His account was supported by another local.
Emmanuel, whose parents were from Nigeria's mainly Christian south but who was born and raised in Pandogari, had gone into hiding following the post but was found.
Soldiers and police have made arrests and imposed an overnight curfew to restore calm after crowds went on the rampage, looting shops, burning a church and demanding the suspects' release.
Also Read
Sallau said soldiers opened fire and killed three while three others were injured. The military said one of the dead was a member of the Nigeria Security and Civil Defence Corps.
Army spokesman Major NC Agwu confirmed that Emmanuel was killed by a mob "on (the) allegation of posting a blasphemous statement about Prophet Mohammad on the social media".
"Regrettably, one church, one house and a shop were burnt while 25 other shops were looted following the violence," added Agwu.
Prophet Mohammed is the most revered figure in Islam and blasphemy against him is punishable with death under Islamic law.
Previous allegations of blasphemy against the Prophet have seen deadly sectarian clashes before in Nigeria, which is almost evenly split between Muslims in the north and Christians in the south.
The riots were fuelled by comments in a Nigerian newspaper article. Days of violence left more than 200 people dead.
In 1987, hundreds were killed in the town of Kafanchan, also in Kaduna, following an alleged blasphemy by a Christian evangelist.
In January this year, an Islamic court in the northern city of Kano sentenced a Muslim cleric to death for blasphemy after comments he made last year sparked violent protests.