The Atlas Lions, however, had already qualified despite losing their first match in the qualifiers.
Zambia made a return to the Africa Cup of Nations finals after beating Ivory Coast 3-0 at the Levy Mwanawasa Stadium on Saturday.
Patson Daka and Kings Kangwa’s second half goals and an own goal by Nottingham Forest’s Serge Aurier were all enough to secure Chipolopolo a win and a passage to the finals that will be held in Ivory Coast.
With one match remaining, the 2012 champions already have 12 points in Group H, two ahead of the Elephants.
The group is now closed, as only one nation was expected to grab the ticket to the next edition of the AFCON finals.
08:00 - 18.06.2023
FOOTBALL Harambee Stars vs Mauritius: Predicted starting XI
Pulse Sports looks into how Kenya might line up for their game against the hosts of the Four-Nations tourney.
It will be Zambia’s first appearance at the continental finals since their last participation in 2015.
Meanwhile, at the FNB Stadium in Johannesburg, Morocco were beaten 2-1 by South Africa.
Both Bafana Bafana and the Atlas Lions had already booked their places in the Ivory Coast finals, so the outcome did not have much impact on their individual aspirations.
The North Africans, impressive at the World Cup finals in Qatar last year, suffered their first defeat in the AFCON finals.
The 1996 African champions went ahead in the fifth minute when Mohamed Munir conceded an own goal.
Orlando Pirates forward Zakhele Lepasa scored the second goal for the hosts in the 48th minute, before Chelsea forward Hakim Ziyech found the back of the net for the Moroccans at the hour mark.
07:30 - 18.06.2023
FOOTBALL Harambee Stars vs Mauritius preview and kick-off time: Can Kenya make it two in two?
The nations meet for their final assignment as the June tournament ends after a week.
In Douala, Cameroon, Angola defeated the Central African Republic 2-1 to keep their dream of making it to the 2023 AFCON finals alive.
Felicio Mendes ‘Milson’ Joao scored four minutes from time to hand the South Africans the away win and help them move second in Group E.
Angola now have eight points, while the Central African Republic has only one.