After two decades in power, Algerian President Abdelaziz Bouteflika will not be seeking re-election, his office announced late on Monday.
The news sent hundreds to the streets of Algiers to celebrate the end to weeks of protests.
The ailing Mr Bouteflika, 82, told the national news agency APS that the April elections would be postponed but he did not set a new date.
The elections would follow a national conference on political and constitutional reform to be completed by the end of 2019.
The presidency said there would be a government reshuffle and Prime Minister Ahmed Ouyahia announced his resignation.
For the past two weeks there have been daily protests across the country and on Friday tens of thousands took to the streets of the capital in a largely peaceful rally.
Mr Bouteflika vowed "to hand over the duties and prerogatives of the president of the republic to the successor freely chosen by the Algerian people".
He said that "there will not be a fifth term" but implied that he would remain in office until his term expires on April 28.
Mr Bouteflika said he was responding to "a pressing demand" from the people.
Late on Monday, Ennahar TV announced that the new prime minister was Noureddine Bedoui and said Ramtane Lamara was appointed to the new position of deputy prime minister.
Protesters have demanded a new leadership and an end to "le pouvoir" – a tiny elite of military officers, veterans and big businessmen who have governed for years.
Mr Bouteflika suffered a stroke in 2013 and has rarely been seen in public since.
Tens of thousands of people from all social classes demonstrated against his decision to stand for a fifth term in office, rejecting a stale political system dominated by veterans of an independence war against France that ended in 1962. Mr Bouteflika has ruled for 20 years.
Algerians yesterday took to the streets of the capital, shouting, dancing and honking car horns.
But a sense of scepticism prevailed.
"His declarations raise a lot of questions," Khadidja Nemar, chief legal adviser at Mena Rights, told The National.
“He denies having ever thought of a fifth mandate while declarations from his party were pretty clear about it.
“He says he won’t be candidate but on the other hand he is prolonging his mandate without invoking any sound legal basis for it.”
Mr Bouteflika earlier told protesters that if he were re-elected in April he would stand down within a year after a national discussion on the constitution.
Many on social media said Monday's announcement looked remarkably similar to his previous offer.
Over the weekend more than 1,000 Algerian judges said they were joining the protests and refusing to oversee the election process if the president ran.
On Sunday, they said they were forming a new association. Justice Minister Tayeb Louh responded to the movement by calling for neutrality.
The country's chief of staff said the military and the people had a united vision of the future. This was considered a sign that the military did not stand with the government.
Mr Bouteflika has commanded much respect for his role in ending Algeria's civil war and bringing the country together after the bloody chapter in which more than 200,000 were killed.
But he held a tight rein on the country and his government was unable to create jobs, despite a massive investment drive through the 2000s paid for by exploiting large reserves of oil, gas and other natural resources.
Today Algerians are happy but not content, Ms Nemar said.
“But bottom line, the demands were about the whole system of governance that Bouteflika personifies,” she said.