Algeria's President Abdelaziz Bouteflika announced his withdrawal Monday from a bid to win another term in office and postponed an April 18 election, following weeks of protests against his candidacy.
Mr Bouteflika, in a message carried by national news agency APS, said the presidential poll would follow a national conference on political and constitutional reform to be carried out by the end of 2019.
The announcement was greeted with celebratory hooting of car horns in the streets of Algiers.
Mr Bouteflika vowed in his message "to hand over the duties and prerogatives of the president of the republic to the successor freely chosen by the Algerian people".
"There will not be a fifth term," the 82-year-old said, while implying that he would remain in office until his term expires on April 28.
"There will be no presidential election on April 18," the scheduled date of polling, Bouteflika said, adding that he was responding to "a pressing demand that you have been numerous in making to me".
APS also reported that Algeria's interior minister Noureddine Bedoui was named Prime Minister in a political shake-up as the President announced his decision.
Mr Bedoui replaces Ahmed Ouyahia as premier and has been tasked with forming a new government, according to the news agency.
The veteran leader, who has been in power since 1999 but whose rare public appearances since a stroke in 2013 have been in a wheelchair, returned Sunday from hospital in Switzerland.
Demonstrations against his bid for another fifth term in office have brought tens of thousands of protesters onto Algeria's streets.
Earlier on Monday, barristers across Algeria joined strike action against President Bouteflika's bid for the fifth term, a day after the ailing leader's return from hospital in Switzerland.
The lawyers launched a 48-hour walkout to demand the Constitutional Council reject his re-election bid on the grounds of "incapacity" to carry out the role. The council has until Thursday to rule on candidates for Algeria's April 18 election.
Magistrates have also been called to strike, although Justice Minister Tayeb Louh has stressed they were duty-bound to remain neutral.
"The judiciary must keep its distance from political tensions," he said.
In addition, more than 1,000 judges had protested against the President, saying they would not oversee the poll with him as a candidate.
They issued a statement saying they would not go against the people's will.
"We announce our intention to abstain from... supervising the election process against the will of the people, which is the only source of power," the BBC said.
Separately, the military's chief of staff, Lt Gen Gaed Salah, said the military and the people had a united vision of the future, state TV reports.
Additional reporting by the BBC