And they are not about to repeat its mistakes.

For the last two weeks, tens of thousands of Algerians have been protesting against the attempt of its 82-year-old president, Abdelaziz Bouteflika, to run for a fifth term.

Bouteflika, who has been in power since 1999, last addressed his people in May 2012, a year after a series of Arab uprisings had toppled three long-term presidents in Algeria’s neighbourhood. In that speech, he made it clear that he was ready to leave the presidency once his third term was up; Algerians still remember very well two statements he made: “My generation has passed its time” and “God bless the man who knows his limits”.

At that time, Algeria was still enjoying unprecedented revenue flow, as oil prices were consistently hovering around $100 a barrel (having reached $140 in 2008). This had allowed the president to “buy” some social peace and contain the fallout from the Arab Spring.

In 2013, he suffered a debilitating stroke, which confined him to a wheelchair, causing many to think this would all-but-guarantee the long-term president’s planned retirement from politics. In 2014, however, Bouteflika made an unexpected u-turn and announced his decision to run again.

The unravelling chaos in neighbouring Libya, as well as Syria, convinced a significant number of Algerian voters to opt for the stability offered by the incumbent president and Bouteflika managed to win a fourth term. The president tried to ease the concerns of voters who still wanted change by promising he would enact reforms that would result in his eventual “passing the torch to the younger generation”.

Unfortunately, these reforms never materialised.

Bouteflika spent most of his fourth term in office between hospitals in Geneva, Switzerland, and Grenoble, France. He was obviously unable to run the country efficiently because of his rapidly deteriorating health. He offered little more than cosmetic solutions to the country’s deep-rooted problems.

He failed to utilise the oil revenues to improve the socioeconomic conditions of the average Algerian. Today, oil prices have halved, corruption levels have reached unprecedented levels, social inequalities have increased, more than a quarter of Algerians under 30 are unemployed, and many are fed up with a president that seems unwilling or at least unable to keep his promises to the people.

This is why after the ailing president announced his intention to run for a fifth term, Algerians from all walks of life took to the streets. Lawyers, journalists, students and academics all voiced their opposition to a fifth Bouteflika mandate.

The authorities clearly miscalculated the effect such a move would have on the people and assumed that demonstrations would take place only in “suspect areas” like the Berber-dominated northern region of Kabylie or some of the restive eastern provinces. Instead, demonstrators marched in cities and towns across the country. Algiers, where protests were hitherto banned, saw the biggest gathering in the country.

Even the city of Tlemcen in western Algeria, where the majority of Bouteflika’s ministers come from, joined the demonstrations. The Algerian diaspora in London, Paris and Montreal also organised similar marches.

Today, many Algerians believe that the ailing president is being used by people in his entourage. They feel that the image of their country, and indeed their long-term president, is being dragged through the mud by people who are not concerned about anything other than enriching themselves and consolidating their grip on the Algerian state.

They feel that some people in the president’s inner circle are trying to use the respect Algerians have for him, given that he is credited for bringing peace to the country through national reconciliation, to pursue their own self-interests.

This is why the demonstrators’ chants have evolved from “Degage!” (Get out) to “Al-shaab yureed isqat al-nidham!” (The people want the downfall of the regime).

Demonstrations have thus far been peaceful and the security services response has been exemplary. However, figures from both the military and the government cautioned people about what may happen if the demonstrations continue.

Ahmed Gaid Salah, the military’s chief of staff and deputy defence minister, has warned that the ongoing protests may soon turn violent. Prime Minister Ahmed Ouyahia, an ally of Bouteflika, also warned the Algerian people about the future, reminding that the war in Syria also began with similar protests.

However, Ouyahia and Salah’s warnings fell on deaf ears, as the demonstrators and their supporters pointed out that the Algerians view not Syria, but Malaysia and Turkey as role models. They reminded the authorities that the first step in Malaysia’s development was getting rid of corrupt individuals and insisted that Algerians have learned a lot from the experiences of the Arab Spring countries.

For now, the protesters appear to have the upper hand in Algeria. Bouteflika’s entourage has already been forced to make some concessions. In a letter read out on state-run TV on Sunday, they announced that if the president is re-elected, he would set up an inclusive national conference that would set a date and prepare for new polls which he would not contest. They also invited the opposition and representatives of the protesters to negotiate a road map.

However, the move failed to appease Algerian protesters, who viewed the offer as yet another tactic to buy time. They felt that the president, who never kept his promise to step down in the past, is unlikely to be true to his world this time.

So, what is next for Algeria?

As the protests are unlikely to die down on their own, there appear to be four options.

The president may pass away. ِAccording to unconfirmed reports, President Bouteflika is in a critical condition in a hospital in Geneva. The president of the Council for Nation, the upper house in the parliament, would take over the presidency for a period of 60 days before presidential elections can take place. This would give the political establishment enough time to agree on a new candidate.

The second, less likely scenario would be for the president’s entourage to withdraw his candidacy because of ill health. The implication would be the same as the first scenario.

A third scenario would be the military intervening to either cancel the president’s candidacy on the grounds of his ill health, or announce that it is no longer going to support him in the presidential race. This would effectively mean that he would lose the election.

Finally, those who would benefit from Bouteflika winning a fifth term could try to turn the peaceful demonstrations into violent ones. The military and security forces would likely intervene, declaring a state of emergency, and the process of change would be aborted.

Aware of the risks of an escalation, protestors remain vigilant. They have learned valuable lessons from their neighbours’ past experiences. Nevertheless, they have claimed the moral high ground and are on course to take their country’s destiny into their own hands.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.