Abdelaziz Bouteflika, who led Algeria out of civil war to become its longest-serving president, has resigned after throngs of protesters and even his military allies told the ailing president he had overstayed his welcome.

Though Bouteflika has rarely been seen in public since suffering a stroke in 2013, his political demise will deepen political uncertainty in the North African OPEC member.

Last elected in 2014, Bouteflika has been largely incapacitated, communicating through statements and governing with the help of his brother Said and a coterie of army officers, businessmen and officials of the ruling FLN party, known collectively as "le pouvoir." His bid for another term in elections initially slated for April prompted anger and disbelief among Algerians, nearly half of whom are under 25 and no longer want to be ruled by aging veterans of the country's war of independence from France.