Algerian president, Abdelaziz Bouteflika, says he will step down by 28 April after two decades in office.

This comes after weeks-long protests across the country saw millions of Algerians take to the streets to demand the president resign.

“President Bouteflika will tender his resignation before the end of his presidential mandate. Important decisions will be taken to ensure the functioning of state institutions during the transition period,” reported privately owned Ennahar TV, citing the presidency.

Under the constitution of the oil producing North African state, Abdelkader Bensalah, chairman of the upper house of parliament, would take over as caretaker president for 90 days until elections are held.

The announcement comes a day after the embattled president named a caretaker cabinet. Incumbent prime minister Noureddine Bedoui will head the administration, state news agency APS said, listing 27 ministers.

Algerians protest against President Bouteflika Show all 14 1 /14 Algerians protest against President Bouteflika Algerians protest against President Bouteflika Protests against President Bouteflika in Algiers on March 15 Reuters Algerians protest against President Bouteflika Protesters march in Algiers to demand the resignation of President Bouteflika on March 15 Reuters Algerians protest against President Bouteflika Protesters carrying the national flag protest against President Boueflika on the Republique Plaza on March 17 AP Algerians protest against President Bouteflika Algerians march during a protest in Algiers on March 15 AP Algerians protest against President Bouteflika Students protest in Algiers on March 19 Reuters Algerians protest against President Bouteflika Protesters hang national flags atop a building in Algiers on March 15 Reuters Algerians protest against President Bouteflika Algerian doctors protest against President Bouteflika on March 19 in Algiers EPA Algerians protest against President Bouteflika Algerians demand the resignation of President Bouteflika in a protest on March 15 in Algiers AFP/Getty Algerians protest against President Bouteflika A woman holds a placard with the photo of President Bouteflika during a protest on March 15 in Algiers AP Algerians protest against President Bouteflika Algerians demand the resignation of President Bouteflika in a protest on March 15 in Algiers AFP/Getty Algerians protest against President Bouteflika Algerian doctors march against President Bouteflika on March 19 in Algiers EPA Algerians protest against President Bouteflika Algerians take part in a demonstration against President Bouteflika on March 19 in Algiers AFP/Getty Algerians protest against President Bouteflika Algerian doctors protest against President Bouteflika on March 19 in Algiers AFP/Getty Algerians protest against President Bouteflika Employees of the Algerian Ministry of Vocational Education and Training protest against President Bouteflika in Algiers on March 18 EPA

Wheelchair-bound Mr Bouteflika had previously postponed elections originally slated for 18 April, and vowed to hand power to a successor once a new constitution was written – but this would have extended his mandate until 2020.

The country’s powerful army chief of staff stepped in last week and called on the president to step down, saying Mr Bouteflika was “unfit for office”.