More than 1,000 judges in Algeria say they will refuse to oversee next month's election if President Abdelaziz Bouteflika is a candidate.
The 82-year-old's decision to run for a fifth term has prompted big nationwide protests, the biggest threat so far to his 20-year rule.
The judges say they will not act against the will of the people.
On Sunday, Mr Bouteflika returned from Switzerland where he had been receiving medical treatment.
Tens of thousands protesters from all parts of society, including students, trade unionists and lawyers, have been demonstrating for more than two weeks.
In a statement, the judges said they should join an effort to "declare that we are the people".
"We announce our intention to abstain from... supervising the election process against the will of the people, which is the only source of power."
Separately, the military's chief of staff, Lt Gen Gaed Salah, said the military and the people had a united vision of the future, state TV reports.
This is the clearest sign yet that Algeria's powerful armed forces are sympathetic to the protests, the BBC's Mark Lowen reports.
Top clerics have also criticised pressure on them to issue pro-government sermons.
"Leave us to do our job, don't interfere," cleric Imam Djamel Ghoul, leader of an independent group of clerics, told journalists.
Mr Bouteflika rarely appears in public and has not given a public address since having a stroke in 2013.
Many young Algerians are frustrated by a lack of economic opportunity and by what they perceive as the corruption of an elite that has governed the country since it gained independence from France.
The president has said the demonstrations could plunge the country into "chaos".