Morocco has qualified for its first FIFA World Cup since 1998 after beating closest Group C challenger Ivory Coast 2-0 away from home on Sunday (AEDT), and Tunisia is through too after a 0-0 draw with Libya.
The Atlas Lions went into the match in Abidjan just needing a draw to consolidate their place as pacesetters in the final group match, but they went one better in what was an assured display.
Nabil Dirar gave the visitors the lead 25 minutes in, cutting in from the right and seeing his left-footed cross go all the way in, raising serious questions over goalkeeper Sylvain Gbohouo.
He was partially at fault again shortly after, failing to come and collect a corner delivery which was ultimately directed into the net by Morocco captain Medhi Benatia, who made the most of slack marking.
The hosts poured men forward for most of the rest of the match, but Morocco generally looked in control of things at the back and held on comfortably, giving Herve Renard, the coach who ended Ivory Coast's Africa Cup of Nations drought in 2015, a famous victory against his former team.
Tunisia needed a draw to pip DR Congo, which began the day three points adrift, to seal top spot in Group A and it duly accomplished that with a 0-0 stalemate at home to Libya.
It was unspectacular, but it got the job done and ultimately progressed with a one-point buffer after a late flurry helped DR Congo beat Guinea 3-1 in the group's other match.
It will be Tunisia's first FIFA World Cup involvement since 2006 in Germany, and it joins Morocco, Egypt, Senegal and Nigeria as Africa's five representatives for Russia 2018.