President Muhammadu Buhari blamed the violence on “hooliganism”, while asserting that security forces have used “extreme restraint”.
The Nigerian leader’s comments are expected to further inflame tensions in Africa’s most populous country after Amnesty International reported that soldiers shot and killed at least 12 demonstrators on Tuesday night as a large crowd sang the national anthem.
The deaths sparked international condemnation.
Mr Buhari also said 11 policemen and seven soldiers had been killed by “rioters” as of Thursday, and “the mayhem has not stopped”.
He said another 37 civilians were injured in some of Nigeria’s worst turmoil in years.
The president said the well-intentioned protests had been hijacked by thugs.
But many Nigerians are upset by what the president has not said. In a national address on Thursday night, Mr Buhari did not mention the shootings, instead warning protesters against “undermining national security and law and order”.
On Friday, he said the government “will not fold its arms and allow miscreants and criminals continue to perpetrate acts of hooliganism”.
Soldiers remain in parts of Lagos, Nigeria’s largest city, as a 24-hour curfew continues.
Okechukwu Nwanguma, of the Rule of Law and Accountability Advocacy Centre, said the president’s comments were worrying and “devoid of sympathy”.
He said that shielding those behind the shootings will only lead to abuses by the police and military, adding: “If those who carried out the killings did so and nothing happens, it will encourage them and others to do the same thing next time.”
Citing the president’s comments, one influential group behind the protests, the Feminist Coalition, urged people to stay at home, saying that “we need to stay alive to pursue our dreams to build the future”.
However, Seriki Muritala, of the National Youth Parliament, said that if the protests have been hijacked, then Nigerian youths should not give up the struggle and instead should “go back and re-strategise”.
This week’s scenes have touched a chord with Black Lives Matter supporters in the United States, while the US government has strongly condemned the “use of excessive force by military forces who fired on unarmed demonstrators in Lagos, causing death and injury”.
The protests turned violent on Wednesday after the military’s shooting as mobs vandalised and burned police stations, courthouses, TV stations and a hotel.
Police battled angry crowds with tear gas and gunfire. The looting and gunfire continued on Thursday.
The demonstrations began early this month with calls for Nigeria’s government to shut down the Special Anti-Robbery Squad, a police unit known as Sars.
The squad was launched to fight crime, but it carried out torture and killings, according to Amnesty International.
The #EndSARS campaign spread across the country and Buhari’s government announced that it would disband the Sars unit. The protest persisted with demonstrators calling for more widespread reforms of the police and an end to corruption.
In one attempt at calming tensions on Friday, the Lagos state government shared a list of ongoing prosecutions against police officers accused of human rights abuses.
Governor Babajide Sanwo-Olu said: “Today seems like a good day to get on to the work of rebuilding Lagos and ending police brutality.”
But an angry crowd shouted at him over the unrest as officials toured burned-out vehicles and the sacked palace of a Lagos ceremonial leader.
The leader, or oba, is not popular with some Nigerians who see him as a product of the country’s often corrupt politics.
Opulence and grinding poverty are in close contact in Lagos, a city of some 20 million, and the inequality sharpens Nigerians’ grievances.
After touring the battered city, the governor told reporters he was “very traumatised” and that “we lost people in several parts of the city”.
He said: “Enough is enough. We need to heal ourselves.”
Mr Sanwo-Olu said the curfew would begin easing on Saturday morning and a panel looking into the unrest would begin receiving petitions on Monday.