(CNN) Algerian President Abdelaziz Bouteflika has announced that he will not seek a fifth term in office and that the April 18 elections are postponed, after weeks of protests surrounding his candidacy.

The ailing 82-year-old, who has ruled the country for two decades, sparked mass protests after he announced his candidacy for the upcoming elections. He has rarely been seen in public in recent years after suffering a stroke in 2013.

"There is no place for a fifth term," Bouteflika said in a statement, according to the official Algeria Press Service (APS). "My health and my age only permit me to fulfill my last duty towards the Algerian people -- (that) is to work on laying the foundations of a new republic."

Addressing the Algerian people directly, the letter described the decision as a "response to the urgent demand that you have made of me" and promised that the "succession between generations" is inevitable.

Shortly after the announcement, Algerians took to the streets to celebrate the news, draping themselves in the national flag.

Read More