Algerian former President Chadli Bendjedid has died of cancer at the age of 83, state-run media have announced.
Mr Bendjedid died at an Algiers military hospital where he was taken when his condition worsened a week ago.
He served four terms from 1979-1992, and had begun to implement moves towards multi-party democracy.
But he was forced from office as the military stepped in when Islamists were set to win power in parliamentary elections as a result of his reforms.
Violence broke out in Algeria as the army dissolved parliament in 1992 and cracked down on Islamists across the country, sparking a long and bloody civil war.
Mr Bendjedid served as defence minister under Houari Boumedienne who died in December 1978. Two months later he took over as president.
Three days of mourning have been declared.