Algerian strongman military chief Ahmed Gaid Salah, known for telling veteran leader Abdelaziz Bouteflika to resign, has died aged 79, official media say.
Gen Salah was one of the last veterans of the 1954-62 independence war against France still in power. No details have been given about the death.
Mr Bouteflika, who ruled since 1999, resigned in April after mass protests, leaving Gen Salah as de facto leader.
The opposition has been calling for the whole of the old regime to quit power.
Gen Salah has been replaced as acting army head by Gen Said Chengriha and three days of mourning have been announced.
Gen Salah played a major role in organising presidential elections on 11 December, which were boycotted by the opposition. He said they were necessary to avoid the country descending into chaos.
The election, fought between five candidates closely associated with Mr Bouteflika, was won by former civil servant Abdelmadjid Tebboune.
Mr Tebboune was dubbed as the “chosen one” on social media because he was seen as being close to the army chief.
Who is General Salah?
It was the military chief who announced on 26 March that article 102 of the constitution – allowing the president’s removal on grounds of ill health – should be applied.
Mr Bouteflika’s resignation followed several hours later.
But protesters continued to call for the removal of those around the president, including Gen Salah himself.
Ever since independence, the army has been the real centre of power in Algeria, arbitrating factional conflicts among politicians and business interests, making and unmaking presidents.
Mr Bouteflika himself was brought to the presidency in 1999 by a group of generals who had prosecuted a brutal war against militant Islamist insurgents since 1992.
Gen Salah, head of the army since 2004, was a central figure in this system.