Algeria’s President Abdelaziz Bouteflika has resigned after weeks of massive street protests.
Mr Bouteflika, who has been in power for 20 years, had already dropped plans to seek a fifth term as opposition to his rule grew.
The powerful Algerian army had called for the 82-year-old to be declared incapable of carrying out his duties.
Protesters have vowed to continue piling on pressure until the entire government is ousted.
The BBC’s Mohamed Arezki Himeur in Algiers says there were huge celebrations in the city, with people shouting, waving the national flag and honking their car horns all night.
He says the protesters do not only want Mr Bouteflika to go, but the whole system, in particular the government which was only appointed last weekend.
“This is just a little victory – the biggest is still to come,” one protester said.
Mr Bouteflika, who has been ill since he suffered a stroke six years ago, has avoided public events ever since.
However, he made a rare appearance on state TV to relinquish power hours after military chief Lt Gen Ahmed Gaed Salah called on him to leave office immediately.