An Algerian military court on Monday upheld a 15-year prison term for the brother of former president Abdelaziz Bouteflika and two ex-intelligence chiefs convicted of conspiracy against the state, a lawyer said.

The once mighty Said Bouteflika, 62, was long seen as the real power behind the presidency after his brother suffered a debilitating stroke in 2013.

He had served as a key presidential aide but was detained in May last year, a month after Bouteflika quit office weeks into mass protests against his bid for a fifth presidential term.

In September Said Bouteflika, along with several other senior regime officials, was sentenced by a military tribunal to 15 years in jail for "conspiring" against the state and undermining the army's authority.

Their convictions were the most high-profile in a string of prosecutions of prominent politicians and businessmen after Bouteflika was pushed out in April after two decades in power.

A court in Blida, south of Algiers, began hearing an appeal against the sentences on Sunday behind closed doors and amid heavy security.

Algeria's state prosecutor sought an increased penalty of 20 years in jail, lawyers said, but the court confirmed the original sentences.

"Said Bouteflika, General (Athmane) Tartag and General (Mohamed Lamine) Mediene received 15 years in prison. The initial verdict was confirmed," lawyer Boudjemaa Guechir told AFP.

Mediene, known as "Toufik", headed the powerful Department of Intelligence and Security for 25 years and was sentenced in September alongside the former president's brother.

Also in court were Mediene's former right-hand man, Tartag, and Louisa Hanoune, who had served as secretary general of the left-wing Workers' Party.

Guechir, who represented Hanoune, said her initial sentence of 15 years was reduced to three years before she was released late Monday and greeted by waiting relatives.

The four defendants were accused of having met in March 2019 in a bid to derail plans by the army high command to force the departure of Abdelaziz Bouteflika.

Said Bouteflika allegedly wanted the intelligence bosses to dismiss the army chief of staff at the time, General Ahmed Gaid Salah.

Defence lawyers had hoped the four would be released after Algeria's balance of power shifted following the December 23 death of Gaid Salah at the age of 79.

"I am disappointed but not discouraged," said Farouk Kessentini, Mediene's lawyer, adding they planned to appeal to the Supreme Court on points of law.

An Algerian anti-government protest movement that began almost a year ago and brought down Bouteflika has continued, demanding the dismantling of the political system and its representatives who have been in power for several decades.

Tartag's lawyer, Me Khaled Bergheul, said his client had been held "hostage" to protest movement.

"It's a heavy penalty. My client knows very well that the economic situation in the country is not conducive to a light verdict," he told AFP.