For weeks, millions of protesters filling Algeria’s streets have demanded the end of President Abdelaziz Bouteflika’s 20-year rule, as well as the “System” of cronyism and corruption he oversaw. On Tuesday night, the wheelchair-bound, 82-year-old president was finally forced from power.

The final push came from the army chief of staff, Ahmed Gaïd Salah, a former ally who belatedly came around to the protesters’ view that the president was physically unable to perform his role, and was being used by a tight circle of family members and businessmen to preserve their privileges.

The country’s constitutional council ratified the resignation on Wednesday, formally ending the rule of a man who had locked down Algeria’s politics for a generation, but leaving the country on the threshold of new uncertainties.

Even though the protesters remarkably succeeded in removing Mr. Bouteflika from office without a single life lost or shot fired by the security services, the standoff is far from over.