Two goals in the space of five minutes midway through the first half ensured a 2-0 away win for Morocco over the Ivory Coast as they secured a return to the World Cup finals for the first time since 1998.
Morocco needed a draw to finish top of Group C in the African preliminaries to guarantee qualification, while the Ivorians had to win at home.
Tunisia qualify for World Cup finals
Tunisia qualified for next year's World Cup finals in Russia after they finished top of Group A in the African preliminaries following a goalless draw at home with Libya on Saturday.
It will be their fourth appearance at the finals but first since 2006 in Germany.