In late February, just as protests against a fifth term for Algeria’s President Abdelaziz Bouteflika were gathering momentum, the country’s prime minister warned ominously of a “Syrian scenario”. By this, he meant a peaceful protest movement turning into a civil war and destroying what had been a stable, placid nation.

“Demonstrators offered roses to the policemen,” Ahmed Ouyahia told lawmakers, speaking of the Algerian protesters who have been taking to the streets week after week. “But we should remember Syria also began with roses.”

The threat failed, even provoking Algerians to come out in even larger numbers to prove a point: that Algeria is not Syria, or Libya or Iraq.

Less than a month after his ill-fated speech, Mr Ouyahia was gone. He was forced to resign as part of a cabinet shakeup that Mr Bouteflika – or whoever is handling the affairs of the wheelchair-bound 82-year-old president – announced to assuage unrelenting anti-government protesters. On Friday, 42 million of them flooded the streets of the nation.

“It’s overwhelming,” says Hacine Haroune, a former Algerian secret services official now living in the UK. “I don’t think anyone has expected this huge an uprising. You look in the streets – the protests are bringing the poor, the rich, the young, old, the men, the women, the disabled.”

Mr Bouteflika too is all but gone, after the country’s powerful army chief of staff, General Ahmed Gaid Salah, called for him to step aside. The general invoked a constitutional article rendering the president unfit to perform his duties, compelling him to hand power to the upper chamber of parliament ahead of elections in a few months.

The president’s most powerful oligarchical ally, Ali Haddad, resigned as head of an influential business lobby on Friday, as the revolution that no one expected continues to surge.

“Yetnaho gah!” chant the protesters in the Algerian dialect of Arabic. It means, get rid of all them all.

Algerians protest against President Bouteflika Show all 14 1 /14 Algerians protest against President Bouteflika Algerians protest against President Bouteflika Protests against President Bouteflika in Algiers on March 15 Reuters Algerians protest against President Bouteflika Protesters march in Algiers to demand the resignation of President Bouteflika on March 15 Reuters Algerians protest against President Bouteflika Protesters carrying the national flag protest against President Boueflika on the Republique Plaza on March 17 AP Algerians protest against President Bouteflika Algerians march during a protest in Algiers on March 15 AP Algerians protest against President Bouteflika Students protest in Algiers on March 19 Reuters Algerians protest against President Bouteflika Protesters hang national flags atop a building in Algiers on March 15 Reuters Algerians protest against President Bouteflika Algerian doctors protest against President Bouteflika on March 19 in Algiers EPA Algerians protest against President Bouteflika Algerians demand the resignation of President Bouteflika in a protest on March 15 in Algiers AFP/Getty Algerians protest against President Bouteflika A woman holds a placard with the photo of President Bouteflika during a protest on March 15 in Algiers AP Algerians protest against President Bouteflika Algerians demand the resignation of President Bouteflika in a protest on March 15 in Algiers AFP/Getty Algerians protest against President Bouteflika Algerian doctors march against President Bouteflika on March 19 in Algiers EPA Algerians protest against President Bouteflika Algerians take part in a demonstration against President Bouteflika on March 19 in Algiers AFP/Getty Algerians protest against President Bouteflika Algerian doctors protest against President Bouteflika on March 19 in Algiers AFP/Getty Algerians protest against President Bouteflika Employees of the Algerian Ministry of Vocational Education and Training protest against President Bouteflika in Algiers on March 18 EPA

But Algeria has for decades been ruled by perhaps a dozen or so shadowy rival networks of military and intelligence officials, leaders of the dominating National Liberation Front (FLN) party, business people, and regional leaders. They are collectively known by Algerians and Algeria specialists as le pouvoir – the power.

“You have the army, the old guard and there’s the new guard,” says Tarek Cherkaoui, a North Africa specialist at the TRT World Research Centre, a think tank associated with Turkey’s public broadcaster.

“Then you have the old FLN, and offshoot organisations, a lot of businesspeople. They marry each other. They have social relationships. They go to the same clubs, live in the same compounds.”

Mr Bouteflika came to power as the country licked its wounds in the aftermath of its devastating 1990s civil war, triggered by generals who refused to allow Islamists to win elections.

Protesters at a mass demonstration against ailing President Abdelaziz Bouteflika in Algiers (AFP/Getty Images)

His skill was to deftly balance the rival centres of power within the establishment, serving as a kind of gatekeeper for distribution of the country’s hydrocarbon wealth. When oil prices were high, and there was plenty of cash to throw around, the system worked. Power centres were sated. And the public could be bought off or silenced with water cannons.

But Mr Bouteflika’s debilitating stroke in 2013, combined with a decline in oil prices, began to demolish the delicate balance. For years, he’s divided his time between Algiers and various hospitals and clinics in Switzerland and France where he seeks medical care.

Inside the halls of power, Algeria’s various factions are in deep discussions about what steps to take to keep peace within the regime and satisfy protesters’ demands for change.

The pouvoir don’t want a completely independent figure. They want someone who can be influenced by them Keren Uziyel, a North Africa analyst at the Economist Intelligence Unit

“There are non-stop meetings in Algiers,” says Francis Ghiles, an Algeria specialist at the Barcelona Centre for International Affairs, who speaks regularly with contacts in the country. “The idea is to how to go forward. How you can build an interim presidency for six months which can hold clean and fair elections?”

Within le pouvoir, discussions are focused on propping up a transitional figure, a former head of state or cabinet minister, who is enough of an outsider to calm protesters, but enough of an insider to remain credible to the establishment.

“The pouvoir don’t want a completely independent figure,” says Keren Uziyel, a North Africa analyst of The Economist’s Intelligence Unit. “They want someone who can be influenced by them.”

Algeria, unlike other Arab authoritarian states, boasts a plethora of opposition political parties and outlets. A year of campaigning could yield open elections and a freely elected parliament that could assemble a cabinet.

But in addition to the entrenched power and interests of le pouvoir, historical trauma explains why authorities don’t simply buckle to public demands and open the political space for real elections.

Algeria did open up such space after a late 1980s uprising, only to have hardline Islamists nearly take power. That experience weighs heavily on the minds and emotions of the septuagenarian and octogenarian politicians running the country. But not so much for the young protesters and the bulk of Algerians born during or after the 1990s.

“The people going into the street are too young to remember,” says Mr Haroune. “They don’t know fear.”

Protesters have made paeans to the army and police, calling for solidarity. Algerian state news agencies on Friday insisted protesters were chanting slogans in support of the armed forces and in praise of General Salah.

Police use water cannons against protestors in Algiers (EPA)

But many Algerians benefit from what happened in Egypt, where a popular uprising was crushed in a military coup. Many of the protesters instinctively realise that the people and le pouvoir are facing off against each other, even though it was General Salah who called for Mr Bouteflika’s departure this week. On social media, photos circulated showing protesters holding signs against General Salah.

“Bouteflika you will leave, bring Gaid Salah with you!” read one slogan.

“People are determined to take to the streets until substantial results are reached,” a journalist in Algiers tells The Independent. “Some are happy, but most of the people are suspicious and not really confident about the application of the law and what will come after it.”

What’s happening now is an Algerian regime in transformation, with everything in flux. For now, the people are the most influential players, but the generals are attempting to take control.

On Friday, security forces reportedly fired rubber bullets and water cannons on protesters in attempts to enforce a years-long ban on large gatherings. But it was to little avail. The protesters surged into main squares.

“The public has the upper hand; all the others are trying to adapt and understand,” says Mohammed Affan, an expert on Arab politics and North Africa.

“But a new transitional change is emerging. During this phase, the public will lose part of its influence to more organised forces – the state forces and the opposition parties.”

Mr Affan says the dangers for Algeria remain high. All the likely factors for a forceful response by the military are present in Algeria, including a past history of intervention in politics, a weak and divided civilian political scene, large numbers of officers involved in politics, and military officials with huge economic interests.

On the other hand, the failures and institutional rot over the last 20 years have so thoroughly disillusioned Algerians, including military officers and rank-and-file, that there’s absolutely no guarantee they’d agree to follow orders to shoot on demonstrators, as they did in Egypt in 2013.