The President said this on Tuesday, while condemning the killing of eight people in Zamfara State on Monday.
A mob had set the house of a man ablaze for rescuing an undergraduate, who was accused of blasphemy, resulting in their deaths and those of six others.
However, on his Twitter handle on Tuesday, President Muhammadu Buhari condemned the violence.
“I received news of the mob killings in Zamfara with great dismay. It is barbaric and unacceptable,” he said.
“I assure Nigerians that the law will take its course. Under my watch, we will work to ensure that there is no place for violence in the name of religion, ethnicity, or in any guise whatsoever.”