Mass protests this year in Algeria, which holds a presidential election on Thursday, have caused the biggest political crisis since the end of its 1990s civil war that killed 200,000 people.
Here is a timeline of the main events.
Tens of thousands of protesters take to the streets when it becomes clear veteran president Abdelaziz Bouteflika, then 81, will run again for president.
As daily protests grow, and 1 million people march in Algiers and other cities, Bouteflika tries to mollify his opponents by promising a new constitution after his re-election, followed by a new vote in which he would not stand.
Army chief Lieutenant General Ahmed Gaid Salah steps in, using a televised speech to urge Bouteflika to resign, which he does on April 2. The presidential election, initially scheduled for April, then for July, is postponed indefinitely.
May and June
With no let-up in the weekly Tuesday and Friday protests, the authorities begin detaining senior figures, including many Bouteflika allies and top businessmen, on corruption charges.
Those arrested include Bouteflika’s younger brother Said, who had acted as de facto regent as the president ailed, the once-untouchable security chief Mohamed Mediene, and two former prime ministers Ahmed Ouyahia and Abdelmalek Sellal.
Police arrest dozens of protesters for waving flags marked with Berber symbols, accusing them of undermining unity, as tens of thousands continue to march, undeterred by summer heat or the Muslim fasting month of Ramadan.
At Gaed Salah’s urging, the interim president Abdelkader Bensalah announces that the election will now be held in December, angering the protesters who immediately reject the coming vote.
At the first major trial for former senior officials, both Said Bouteflika and Mediene are given 15-year jail sentences, cementing the army’s position as the most powerful part of the ruling hierarchy.
Meanwhile, police start arresting more prominent opposition figures including Karim Tabou.
As the election campaign officially starts, the number of protesters begins to rise again and the police start cracking down on demonstrations against the coming vote.
Protesters hang bags of garbage in spaces reserved for election materials and a court holds rapid trials to sentence people to months in prison for disrupting campaigning.
A court sentences the two former prime ministers to 15 and 12-year prison terms days before the election, which the protesters continue to reject.