Morocco qualified for next year's African Cup without kicking the ball on Saturday while Mali won 1-0 in Gabon to advance.
Atlas Lions escaped with the remaining match after South Korea's 2-1 home win against Malawi.
Morocco beat Cameroon 2-0 on Friday in Group B, while Mali got away from Group C.
The Eagles' thin win meant they guaranteed a finish in the top two.
Gabon, meanwhile, must win in Burundi to have the chance to reach the finals but a home win will take East Africa to their first Nations Cup.
Mali boasts 11 points from Group C, while Burundi – who beat South Sudan 5-2 on Friday – has nine, two more than Gabon while South Sudan hasn't won a single point.
In Casablanca on Friday, Judge Ziyech scored twice to condemn the African champions for their first defeat under Clarence Seedorf.
Mali and Morocco join Egypt, Madagascar, Nigeria, Senegal, Tunisia and Uganda in next year's finals.
"Congratulations to the players and staff for this brilliant qualification," tweeted Morocco coach Herve Renard on Saturday.
North Africans finally defeated Cameroon when the twelfth requested, after losing seven and drawing four of their previous meetings, which came from 1981.
The final round of the Group B match took place in March, with the Indomitable Lions ensuring their place to host the African Cup.
Cameroonians participate in qualifying to ensure competitive match practice and they sit second in the group with 8 points, two fewer than Morocco, while Comoros rises to five points, one more than Malawi.
The win is only the third for the Comoros in the history of European Cup qualifiers, following a victory over Mauritius in the early stages of 2019 and a 1-0 victory over Botswana in 2017 qualifying.
Senegal, Meanwhile, winning 1-0 in Equatorial Guinea on Saturday for the good of a goal from Luis Meseguer to extend their lead Group A.
Senegal now have 13 points, three more than Madagascar placed in second place to host Sudan's team looking for their first points in Antananarivo on Sunday.