Uganda qualified for the 2019 Africa Cup of Nations Saturday while Libya scored eight goals to keep alive hopes of also featuring at the finals.
Uganda edged Cape Verde 1-0 in Kampala and Morocco went through after rivals Malawi lost 2-1 in the Comoros.
Libya triumphed 8-1 in the Seychelles and host South Africa next March needing a win to accompany Nigeria from Group E.
The Libyans just missed equalling the record away winning margin for a Cup of Nations qualifier held by Ghana, who won 9-1 in Niger 49 years ago.
A total of eight nations have secured places at the 24-team finals with hosts Cameroon, Madagascar, Senegal, Egypt and Tunisia securing places before this weekend.
Nigeria, the three-time former champions who had failed to qualify for the last two editions, were ahead in South Africa within nine minutes when Buhle Mkhwanazi conceded an own-goal.
Outstanding South African Percy Tau set up the equaliser for Lebo Mothiba on 26 minutes, but the hosts were fortunate as several contentious offside decisions went against Nigeria.
Anis Saltou bagged a hat-trick in Victoria as Libya humiliated the Seychelles, whose 188th world ranking is the lowest among the 48 teams in the qualifying competition.
A Patrick Kaddu goal on 79 minutes not only assured Uganda of first place in Group K, it also opened the door for Tanzania to also qualify.
If the Tanzanians win in Lesotho on Sunday they will return to the African football showcase after a 38-year absence.
Morocco qualified when Group B rivals Malawi lost 2-1 away to out-of-contention Comoros in Mitsamiouli.
The Comoran victory in the Indian Ocean island state gave Morocco an unassailable six-point advantage over Malawi with only one matchday left.
El Fardou Mohamed Ben Nabouhane, who has been playing for Red Star Belgrade in the UEFA Champions League, gave the Comoros a second-minute lead.
Patrick Phiri equalised after 53 minutes and Nasser Chamed scored the match-winner in the 70th minute on an artificial pitch.
Leaders Morocco and second-placed Cameroon qualify from the group with the latter assured of a place because they are hosting the June 15-July 13 tournament.
Cameroon are involved in the qualifying competition to gain match practice before defending a title they won in Gabon last year by defeating Egypt 2-1 in the final.
Morocco climbed above Cameroon into first place in Group B Friday after beating them 2-0 in Casablanca thanks to a second-half brace from Hakim Ziyech.
Although consistently among the strongest African national teams, Morocco have won the Cup of Nations only once, in 1976 in Ethiopia when the tournament was a series of mini-leagues.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)