Algerian President Abdelaziz Bouteflika has postponed the 18 April presidential elections and said he will not seek a fifth term in office.

President Bouteflika's candidacy had provoked mass protests across Algeria over the past few weeks.

He has led Algeria for 20 years but has been rarely seen in public since he suffered a stroke in 2013.

No new date for the election was set. A cabinet reshuffle will happen soon, a statement in Mr Bouteflika's name said.

There was no suggestion in the announcement that the president intends to step down before a rescheduled election.

Meanwhile, Algeria's Prime Minister Ahmed Ouyahia announced his resignation and was replaced by Interior Minister Noureddine Bedoui, who has been tasked with forming a new government, the official APS news agency reported.

What did Bouteflika say?

"There will be no fifth term," Mr Bouteflika was quoted as saying in a statement. "There was never any question of it for me. Given my state of health and age, my last duty towards the Algerian people was always contributing to the foundation of a new Republic."

He had pledged last week that he would step down early if re-elected - but the guarantee failed to placate the thousands of demonstrators.

Image copyrightAFPImage caption
Abdelaziz Bouteflika, pictured here in 2017, has not spoken in public since 2014

Algeria had been hit by strikes by teachers and students, as well as shops closing and train services being suspended as thousands took to the streets.

What changed on Monday?

Pressure mounted on Mr Bouteflika to withdraw when more than 1,000 judges said on Monday they would refuse to oversee the planned general election were he a candidate.

Then the military's chief of staff, Lt Gen Gaed Salah, said the military and the people had a united vision of the future - the strongest indication so far that the armed forces were sympathetic to the protests.

Top clerics had already criticised pressure on them to issue pro-government sermons. "Leave us to do our job, don't interfere," cleric Imam Djamel Ghoul, leader of an independent group of clerics, told journalists.

Status quo 'no longer acceptable'

Rana Jawad, BBC North Africa correspondent

This will be seen as a partial victory for those who have been on the streets for weeks. While it is a guarantee from Mr Bouteflika that he will not seek a fifth term, the absence of a new election date potentially leaves the process frustratingly open-ended.

The reaction on social media was swift, and questions are already being asked over the legality of prolonging Mr Bouteflika's term in office beyond the constitutional mandate.

The delay could help to ensure a peaceful transition of power - allowing all candidates to campaign properly while addressing the public's core demand of removing Mr Bouteflika from office.

But key to satisfying the protesters' demand will be a timetable for his departure. And the legitimacy of an election does not stop at the ballot box - the ruling elite, the country's judges, and its electoral bodies will need to demonstrate a genuine will to ensure a free and fair poll.

Algerians have shown they are no longer willing to accept the status quo, and that will undoubtedly extend to close scrutiny of how the next election plays out.

Media playback is unsupported on your device

Media captionAlgeria protests: What's behind them?

Was Bouteflika's health a factor?

The president's announcement came a day after he returned home after a two-week stay in a Swiss hospital, where he has been for treatment since suffering a stroke in 2013.

He has over the years since his stroke become a virtual recluse. His last public address was in 2014, shortly after winning the previous general election.

Many Algerians were concerned about his ailing health, and worried that his death in office during a fifth term might cause dangerous political instability.