Some religious leaders and institutions, who share Mr. Bashir’s religious and political worldview, deployed their particular interpretation of Islamic law to argue that the ruler of the state should only be advised in private and that people are not allowed to demonstrate against the state.

While these religious leaders tried to use religion to garner support for Mr. Bashir during their Friday sermons, the attendees at the mosques — tired of the dire conditions in Sudan — responded with unprecedented protests inside the mosques.

On Dec. 21, an imam at the Al Yaqeen Mosque in the Bahri area of north Khartoum argued that the prices were rising because of people’s moral turpitude. Before completing his argument, the people gathered for prayers at the mosque objected and insisted that the imam should get off the pulpit. They forced him to leave the mosque. A week later, Mr. Bashir was attending Friday prayers at a mosque in Khartoum and worshipers chanted slogans asking him to step down. Mr. Bashir left the mosque.

The protests inside the mosques have sent a strong message to Sudan’s religious leaders and institutions that the people will no longer tolerate outdated religious positions and views that help dictators and authoritarian regimes stay in power. And several Sudanese religious leaders have spoken out against the violent repression of protests.

The protests have also created a tenuous unity in the ethnically and regionally divided Sudanese society. Major General Salah Abdallah , the director of the notorious Sudan Intelligence and Security Service, tried to use a divisive strategy to break the momentum of the protests. Mr. Abdallah blamed the Sudan Liberation Movement, a non-Arab rebel group from Darfur, which has been fighting against Mr. Bashir’s government, for burning the offices of the ruling National Congress Party.

But the protesters in Khartoum responded by chanting, “The entire country is Darfur.” The divisive gambit failed because the protests are about desperate economic conditions and authoritarian rule across the country, not unresolved political problems in Darfur.

And despite historical ethnic and regional divisions in Sudan, the drivers and the leaders of the protests are millennials, who seem to have decided to rise above the regional and ethnic dichotomies of their society. More than 60 percent of Sudan’s population is under 25 and around 20 percent is between 15 and 24 years old.