Algeria will face the Ivory Coast, the only team they failed to defeat in winning the last Africa Cup of Nations, when Cameroon host the 2021 edition between January 9 and February 6 2022.
The teams drew 1-1 after extra time in the quarter-finals and the Desert Foxes advanced by winning a penalty shootout.
Matches decided by spot-kicks are officially classified as draws by FIFA, and it was the only time in a seven-match march to the title that Algeria needed a shootout to succeed.
Algeria and the Ivory Coast were placed in Group E with Sierra Leone and Equatorial Guinea when the draw was made in Yaounde on Tuesday.
It would be a shock if the Algerians and Ivorians did not fill the top two spots, leaving the other two countries to fight for possible qualification as one of the four best third-placed teams.
“We have a very good group, with quality, very young, with a lot of ambition,” former Ivory Coast striker Didier Drogba told AFP after taking part in the draw. “I think we will be up to it.”
Although ranked third in the continent this month behind Senegal and Tunisia, Algeria are the form team as they boast an African record 27-match unbeaten run since November 2018.
Cameroon, seeking a sixth Cup of Nations title, were put in Group A with Burkina Faso, who they will face in the opening match in Yaounde, Ethiopia and Cape Verde.
– Egypt face Nigeria –
It is hard to imagine the Indomitable Lions failing to make the last 16 and Burkina Faso will also be confident of progressing.
Record seven-time African champions Egypt share Group D with three-time winners Nigeria, Sudan and Guinea-Bissau, who have been transformed from minnows to qualifying three times in a row.
Egypt can call on Liverpool star Mohamed Salah as they seek to atone for a poor showing as 2019 hosts, falling to South Africa in the round of 16.
Sadio Mane-inspired Senegal, beaten by Algeria in both the group stage and the final two years ago, will be hotly fancied to top Group B, which includes Zimbabwe, Guinea and Malawi.
Tunisia, who have qualified for every Cup of Nations since 1994, are in Group F with Mali, Mauritania and the Gambia, who along with the Comoros are debutants.