The leader of Nigeria's Muslims on Sunday called for followers of the faith to unite against Boko Haram extremists, pledging the government full support to ensure their defeat.
But the Sultan of Sokoto, Muhammad Sa'ad Abubakar III, also said the government should address issues of inequality towards Muslims, which have been seen as factors in fuelling the five-year insurgency.
"Terrorism has no place in Islam," he told a congregation, including Nigeria's Vice-President Namadi Sambo, clerics and traditional rulers, at the National Mosque in the capital, Abuja.
"We must rise up, as always, with one voice to condemn all acts of terrorism, condemn those terrorists wherever they are and try our possible best as Muslims to ensure peace reigns in our community."
The Sultan, who is president of Nigeria's Supreme Council for Islamic Affairs, has come under pressure to speak out against Boko Haram, who have killed thousands in their quest for an Islamic state in the north.
In his first public comments since the militants kidnapped more than 200 schoolgirls from the remote northeastern town of Chibok last month, he said Muslims were disturbed by the bloodshed.
"We are committed to helping the government at all levels to bring peace in Nigeria. Whatever we can do, as long as it is not against Islam, we are ready to do it 100 percent," he added.
"We have to make it very clear... that the situation in the country is very serious. You are fighting enemies with no boundary. Terrorists are everywhere. They are among us but we don't know them."
Abubakar said the situation was worse than during Nigeria's brutal civil war from 1967 to 1970 because of the shadowy nature of Boko Haram's fighters and their guerrilla campaign.
"In this case, you don't know the enemy. The person sitting next to you might be one of those terrorists. You don't know," he said.
"It is a very serious situation and we have to close ranks as Muslims, we have to close ranks as Nigerians, irrespective of ethnic or political divide, and not play politics with insecurity."
Nigeria's north is majority Muslim and is poorer than the oil- and gas-rich, largely Christian south.
Years of social and economic blight have been seen as a recruiting tool for marginalised and disaffected young men to Boko Haram's cause.
The Sultan said addressing inequality would help tackle the problem.
"Muslims want and also demand to be treated with equality, with justice, with fairness and, Inshallah (god willing), things will turn around," he added.