Street protests are officially banned in the capital and the police have not hesitated to use force to repress them. As Mr. Bouteflika’s condition has steadily deteriorated, the government has stifled opposition by adopting security laws with often vague and broad definitions of what qualifies as a threat to the state.

But this time that strategy does not appear to be working. The country’s extensive security forces have been mostly passive as citizens have coursed through the streets of Algiers shouting slogans against Mr. Bouteflika’s candidacy. On Friday, there was occasional use of tear gas, but the police appeared to be well disposed toward the crowds on the whole, observers noted.

For years the government has tamped down opposition by holding itself as the only alternative to the chaos of the country’s bloody civil war in the 1990s, when some 200,000 were killed in an Islamist uprising. That legacy also helped keep the country calm even as others around it were swept up in the Arab Spring of 2011.

But many in the crowd, noted Mustapha Bouchachi, a human rights lawyer in Algiers, are now too young to have known the so-called black decade of the ’90s.

“It’s a movement of the young, and of all Algerian citizens,” Mr. Bouchachi said in a telephone interview from the capital. “It’s this feeling of dishonor, that the regime is daring to present as candidate a man who is gravely ill, and who runs nothing.”

“It’s this contempt for Algerians that is pushing this uprising, along with the rampant corruption,” he added. “The president is incapable both of managing the state, and of naming officials. This person can no longer read or write. He’s been taken hostage by a mafia band.”