The scenes of jubilation on the streets of Algeria on Tuesday night had vivid, almost uncanny echoes of events in the region eight years ago. A wave of protest in a youthful country has ousted an ageing, authoritarian leader who clung to power for years, at the head of a regime perpetuating a clientelist and unequal economy. The ailing 82-year-old president, Abdelaziz Bouteflika, finally succumbed after weeks of protests, sparked by the announcement of his candidacy for a fifth term despite reports that he struggled even to speak.

The country’s oil wealth is drying up, reducing the government’s ability to temper popular discontent via state spending; over a quarter of its youth are unemployed; corruption is endemic. But it was the regime’s sheer contempt for its citizens in nominating a man who has barely been seen in public since a 2013 stroke, and the sense of national humiliation, which brought hundreds of thousands on to the streets. Those behind him hope that his departure will allow them to continue as before. Their opponents, now emboldened by victory, demand real change.

The bloodshed, turmoil and increasing repression which followed the initial euphoria and idealism of the Arab spring in many countries are not far from Algerian minds. Neighbouring Tunisia, where the uprisings began, may offer inspiration. But Syria, Libya and Egypt all cast long shadows. At least as potent is the memory of the country’s own short-lived democratic revival in the late 1980s, which ended when the army cancelled elections as Islamist parties prospered, and the “black decade” that followed, as the battle between Islamist insurgents and the government claimed as many as 200,000 lives.

Protesters have maintained a peaceful and orderly “revolution of smiles”. It may be tactical to stress their respect for security services and the military, but the presence of families protesting together indicates a degree of confidence in their safety on the streets too. Their success in toppling Mr Bouteflika owes much to their ability to unite around the demands for change, as well as to the existence of a relatively vibrant civil society. It also owes a great deal to the divisions in the opaque coalition of powerbrokers that has run things since Algeria won independence in 1962. Mr Bouteflika’s absurd renomination stemmed from his backers’ inability to coalesce around a successor. The intervention of the head of the army, Ahmed Gaid Salah, sped his exit.

But turning this departure into systemic change is far harder. The protesters have no reason to trust the acting leader, Abdelkader Bensalah – a 76-year-old close to Mr Bouteflika – nor to expect that the elections now due in 90 days will be either free or fair, given previous experience. Yet to remain in agreement as they seek to plot an alternative course, and then put that plan into action, is a tall order.

Algeria’s protesters are perhaps more aware than anyone watching of the potential disappointments and dangers ahead. But in their hundreds of thousands they have sent an urgent reminder to authoritarians that their citizens expect something better and will not settle for stability alone; that there is real power in people power; and that the legacy of the Arab spring has yet to be settled.