ALGIERS (Reuters) - Tens of thousands of Algerian protesters chanted slogans on Friday demanding the army quit politics, a purge of the ruling elite, an end to corruption, and the freeing of opposition leaders.

FILE PHOTO: Algerian upper house chairman Abdelkader Bensalah is pictured after being appointed as interim president by Algeria's parliament, following the resignation of Abdelaziz Bouteflika in Algiers, Algeria April 9, 2019. REUTERS/Ramzi Boudina/File Photo

The demonstrations in the capital Algiers and several other cities follow a ruling by a prominent independent cleric this week urging people to vote in a December election backed by the army but opposed by the protest movement.

The fatwa, or Islamic legal ruling, and another two weeks ago, represent the first significant comment on the months-long political crisis by major independent clerics, and may influence conservative Algerians.

The army, which has emerged as the most powerful player in Algerian politics, sees December’s presidential election as the only way to quell the protests and end the constitutional limbo that has prevailed since president Abdelaziz Bouteflika stood down in April.

Demonstrators have rejected the election, however, saying it could not be free or fair while Bouteflika’s allies and military leaders maintain senior positions in the government.

Sheikh Lakhdar Zaoui, a well-known conservative cleric, published a fatwa, or Islamic legal ruling, on Wednesday, saying a Muslim country could not be leaderless.

“When Prophet Mohammed died, he was not buried until a successor was designated by his companions,” he said.

Another cleric, Sheikh Chemseddine Bouroubi, who has a daily television show “Please Advise Me” that answers people’s questions about religion, said last month it was forbidden for Algeria to have no president.

Algeria plunged into crisis in February when massive protests erupted to stop the old, sick Bouteflika running for a fifth term in an election that was scheduled for July.

He resigned on April 2, and the election was postponed. The authorities have meanwhile tried a carrot-and-stick approach to end the demonstrations, arresting Bouteflika allies on corruption charges but also increasing policing at protests.

The leaderless protesters have said the arrests so far are not enough, demanding that the rest of the ruling elite be removed including interim president Abdelkader Bensalah and Prime Minister Nouredine Bedoui.