The electoral authority validated the candidacies of former prime ministers Ali Benflis and Abdelmadjid Tebboune, and two former ministers, one of them a moderate Islamist, plus the head of a small party.
The elections are to replace former longtime President Abdelaziz Bouteflika, forced to resign in April after protests and a stern warning from army chief Ahmed Gaid Salah, who has emerged as the country's authority figure.
Protesters had opposed Bouteflika's planned bid for a fifth term after 20 years in power and now want to dismantle the corruption-ridden system that kept him in office and the long-standing, if often shadowy, role of the military at the top. Bouteflika was Algeria's first civilian president since the nation's first leader after independence from France in 1962, Ahmed Ben Bella, was deposed in a coup.
Besides the two former prime ministers running in next month's presidential election, the other candidates are: former tourism minister and moderate Islamist, Abdelkader Bengrina; former culture minister and current interim secretary of the RND party that was in the governing coalition, Azzedine Mihoubi; and the head of the El Moustakbel (Future) party close to the FLN, also in the ruling coalition, Belaid Abdelaziz.
The announcement came a day after tens of thousands of Algerians marched for a 37th consecutive week to demand an end to Algeria's post-colonial political system. Protesters say they don't trust those currently in power to ensure democratic elections, citing their past links to Bouteflika.
The five who will run were among 23 people who tried to run for the presidency but fell short of the requirements. Rules for candidates included gathering 50,000 signatures from citizens on voting lists from at least 50 regions.