A blunder by Morocco goalkeeper Munir el Kajoui led to a 2-1 Africa Cup of Nations qualifying defeat in South Africa on Saturday -- their first loss since reaching the 2022 World Cup semi-finals.
Zambia completed a joyful day for southern Africa by hammering the Ivory Coast 3-0 in Ndola to secure a place in the finals for the first time since 2015.
South Africa and World Cup history-makers Morocco had qualified ahead of a lively Group K clash in Johannesburg that drew a 50,000 crowd despite near-freezing conditions.
El Kajoui, standing in for rested Yassine Bounou, allowed a Percy Tau cross slip from his grasp into the net after only five minutes and Zakhele Lepasa added a second on 48 minutes.
Hakim Ziyech halved the deficit on the hour, but an equaliser eluded Morocco, who last December became the first African and Arab team to reach the World Cup semi-finals.
After finishing fourth in Qatar, the Atlas Lions beat Brazil and drew with Peru and Cape Verde in friendly matches. The visit to Johannesburg marked a return to competitive action.
"We could have scored four or five goals against Morocco, who are currently the best team in Africa, and it is a great confidence booster to beat them," said South Africa coach Hugo Broos.
"Having played in front of small crowds lately, it was wonderful to have so many people backing us, and I believe they left the stadium feeling very proud to be South Africans."
Morocco coach Walid Regragui, mastermind behind successes over Belgium, Spain and Portugal before a semi-final loss to France in Qatar, said he was "not unhappy with the result".
"Call me crazy if you wish for saying that, but you sometimes learn more from a loss than a win. My players were tired after a gruelling season of domestic and World Cup matches."
- Sad memories forgotten -
Zambia, needing one point to end a run of three failed qualifying campaigns, took all three as they outplayed the Ivory Coast, who will host the January 13-February 11 finals.
After stunning the Ivorians by winning the 2012 final, Zambia declined dramatically, failing to get past the group stage in the following two tournaments.
Worse followed for the Chipolopolo (Copper Bullets) as they did not even qualify for the next three editions.
But those sad memories were forgotten before a capacity 50,000 crowd as Zambia claimed a fourth straight Group H victory.
Serge Aurier conceded an own goal on 32 minutes, Patson Daka doubled the lead three minutes into the second half and Kings Kangwa completed the rout after 55 minutes.
Two-time champions Ivory Coast qualify automatically as hosts, but are competing in the qualifiers to gain competitive match practice.
Central African Republic's hopes of a maiden appearance at the African showpiece are all but over after losing 2-1 to Angola in Douala.
An 86th-minute goal from Felicio Milson sank the minnows after Geoffrey Kondogbia had struck just after half-time to cancel the early lead Kialonda Gaspar gave Angola in the Group E clash.
The Central Africans, playing in Cameroon because they lack an international-standard stadium, were reduced to 10 men when goalkeeper Dominique Youfeigane was sent off on 70 minutes.
Equatorial Guinea became the 10th qualifiers after Ivory Coast, Algeria, Burkina Faso, Egypt, Morocco, Senegal, South Africa, Tunisia and Zambia by edging the Tunisians 1-0 in Malabo.
Emilio Nsue converted a late penalty for the Equatoguineans, who would have qualified from Group J whatever the result as sole rivals Libya lost 1-0 in Botswana.
dl/dj