Algeria's former long-time president Chadli Bendjedid has died of cancer aged 83, the country's APS news agency reported.
Bendjedid, credited with introducing democracy to government institutions, had been admitted to the Ain Naajda military hospital in the capital Algiers more than a week ago.
He was hospitalised in Paris last January for cancer treatment and returned to hospital for brief spells in May and October.
Bendjedid, born in 1929 in the village of Bouteldja in the country's east near the Tunisian border, had written memoirs which are due to be published on November 1, the anniversary of the outbreak in 1954 of Algeria's war of independence.
He was one of Algeria's longest-serving presidents, holding office from 1979 to 1992, when he was forced from power when the army stepped in to stop Islamists from winning the country's first multi-party legislative elections.
The military intervention sparked a civil war in which left 200,000 people dead.
Bendjedid went underground for the duration of the war of liberation against colonial power France between November 1954 and 1962, when he was named military commander of the Oran region of western Algeria for 14 years.
He became a member of the Revolutionary Council, set up in June 1965 after the overthrow of the country's first president Ahmed Ben Bella.
With the army's backing, he was elected president in January 1979 and his mandate was renewed in December 1988, two months after bloody unrest over price rises and demands for democracy.
Bendjedid kick-started the democratisation of government institutions in Algeria, notably by promulgating a pluralist constitution in February 1989.
But after the outbreak of civil war, he was placed under house arrest in Oran in January 1992 and not released until after Abdelaziz Bouteflika, the president, came to power in 1999.