Morocco qualified for the 2018 World Cup in Russian Federation with a 2-0 victory away to Ivory Coast, who missed out on a fourth consecutive appearance at the finals.
A historic World Cup group-stage qualification campaign saw Morocco, who last appeared in the World Cup in 1998, score a total of 11 goals while conceding nothing to finish on top of the group with 12 points.
Morocco and Tunisia now join Nigeria, Senegal and Egypt as Africa's representatives at next year's FIFA World Cup in Russian Federation.
This is the fifth time Morocco qualifies to the World Cup.
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.
Morocco sealed its place in Russian Federation in style as they went to Abidjan and beat Cote d'Ivoire 2-0.
Rattled Ivory Coast fell further behind as they failed to cut off a corner and Juventus defender Benatia struck a first-time shot into the net. Scoring two goals, Morocco has secured a ticket to Russian Federation.
Meanwhile, in Group A, Tunisia played out a tense goalless draw with Libya to edge Congo DR to top spot by just one point.
Tunisia emerged the leaders in Group A, surviving a resilient Libya that shared the spoils of the day with their hosts.
Two stoppage-time goals through Jonathan Bolingi and Neeskens Kebano, which sealed a 3-1 win against Guinea, was not enough for Florent Ibenge's side, who needed Libya to record a victory over the Eagles of Carthage on Saturday.
Ibenge's side will look back at their double header against the Tunisians, when they enjoyed the better of both contests but only took one point out of a possible six, as the reason why they will be watching on from the outside next summer.