ALGIERS (Reuters) - Algeria’s army appeared certain to secure the end of President Abdelaziz Bouteflika 20-year rule after winning over his key allies but the managed exit plan was rejected by protesters demanding the overthrow of the entire political elite.

FILE PHOTO: Algeria's President Abdelaziz Bouteflika looks at journalists after casting his ballot during the parliamentary election in Algiers, Algeria, May 4, 2017. REUTERS/Zohra Bensemra/File Photo

The shift by several pillars of the establishment on Wednesday was a clear signal that the 82-year-old president - who has rarely appeared in public since suffering a stroke in 2013 - has little to no chance of staying in power for much longer in the North African country, an oil and gas producer.

The army’s powerful chief of staff, Lieutenant General Ahmed Gaed Salah, told officers in a speech broadcast on Tuesday that the solution to the crisis would be the departure of the president on health grounds.

Salah called on Algeria’s constitutional council to rule whether Bouteflika was fit for office. Such a ruling would have to be ratified by a two-thirds majority of members in the two houses of parliament.

In the heaviest blow to the ailing leader, the ruling FLN party said it backed the army’s bid to have the constitutional council declare him unfit for office.

“We announce our support for the initiative as a start to a constitutional plan that will allow us to protect our country from dangers,” the party said in a statement.

That move came after Algeria’s biggest union and a powerful party that is part of the ruling coalition announced they would back the military’s approach.

The army has been patiently waiting for the right moment to intervene. Now that the generals have emptied Bouteflika’s inner circle, they are well positioned to play their traditional role of kingmaker in any transition.

The military will face resistance from the leaders of mass demonstrations fueled by anger over alleged corruption, nepotism and economic mismanagement who said the plan still did not go far enough.

“Protests will continue... Algerians’ demands include a change of the political system,” Mustapha Bouchachi, a lawyer and activist, told Reuters.

“The implementation of Article 102 (the part of the constitution that covers declaring a president unfit for office) means that the symbols of the system will oversee the transition period and organize presidential elections,” he said.

Even if both sides dig in, no Algerians want to risk returning to the dark days of the 1990s, when the army’s cancellation of elections that Islamists were poised to win triggered a civil war that killed 200,000 people.

Back then, Islamists had marched in the streets chanting “no laws, no constitution but Allah” under the watchful eye of the military. No women had taken part and the men were bearded, in sharp contrast to the protests which erupted five weeks ago.

These demonstrations have been peaceful, with people singing, laughing and taking selfies as they wave banners calling for peaceful political change. Some even bring lunch to the demonstrations. The military has stayed in its barracks.

The army chief has warned he will not tolerate chaos, but he also praised Algerians for pursuing “noble aims”.

Protesters have repeatedly said they would reject any orchestrated succession in politics and want a transition which will lead to a government by consensus, but there are no signs they will resort to violence to reach their goals.

“We want a real democracy, not a facade of a democracy,” said postal worker Zakaria Jaziri 26.

Slideshow ( 2 images )

State bank employee Djamel Hadidi, 37, said: “We welcome the army’s initiative but we do not want Bouteflika’s men to govern us until the next election.”

HIGH STAKES

Under Article 102 of the constitution, the chairman of parliament’s upper house, Abdelkader Bensalah, would serve as caretaker president for at least 45 days after Bouteflika’s departure.

Even if Bouteflika quits, there is no obvious replacement who could be acceptable to all.

For years, rumors have swirled about potential successors, but no single credible candidate has emerged with the backing of the political and security establishment who is not at least 70.

Facing the biggest challenge to his rule, Bouteflika reversed a plan to seek a fifth term, postponed elections and promised to introduce greater freedoms.

But he stopped short of stepping down, infuriating Algerians who want to do away with veterans of the 1954-1962 war of independence against France, military officers and business tycoons who have dominated for decades.

“Is there a risk of radicalization or confrontation if demonstrators reject the army approach? This is a hypothesis that cannot be totally excluded,” said Louisa Dris, professor of political science at Algiers University.

Western powers will want to see a smooth succession.

Algeria is a member of OPEC and top gas supplier to Europe, though so far oil and gas output appears unaffected by the unrest, an International Energy Agency official said on Tuesday.

Algeria is seen by Western states as a counter-terrorism partner, a military force in North Africa and a diplomatic player in efforts to resolve crises in Mali and Libya.