The two nations will join Saudi Arabia, Egypt and Iran in next year's tournament in Russia
Morocco and Tunisia booked their places at next year’s World Cup finals on Saturday with both teams finishing unbeaten in their qualifying groups.
Goals from Nabil Dirar and Medhi Benatia handed Morocco a 2-0 away win over Ivory Coast, securing a return to the finals for the first time in two decades.
Tunisia won their place in next year's World Cup finals by taking away a point from a goalless draw at home against neighbours Libya on Saturday.
Moroccans celebrate in Marrakech following Morocco's victory over Ivory Coast in their FIFA 2018 World Cup Africa Qualifier on November 11, 2017 (AFP)
Unbeaten Tunisia, who have been to four previous World Cup finals and were the first African country to win a game at the finals in 1978, were denied a fifth win in six group matches as Libya’s goalkeeper Mohamed Nashnush made a number of key saves.
Diving saves kept Youssef Msakni, Anice Badri and Ghilane Chaalani from scoring as Nashnush proved a one-man roadblock. Tunisia threw everything into attacking in the closing stages to try and force a win in front of their home fans.
Libya avoided last place in the group with the draw as they advanced to four points with Guinea staying on three.
Libya had been forced to play all of their home games at neutral venues, including Tunisia, because of a FIFA ban on internationals in the country, where the security situation is judged unsafe for visiting teams.
Tempers spill over
Morocco needed only a draw from their final Group C game to finish top of the standings in the African preliminaries, ahead of the Ivorians, who had to win to clinch a fourth successive World Cup finals appearance.
كأس العالم بنكهة عربية "مصر – السعودية – المغرب – تونس" مبروك علينا جميعًا..
— Mohamed Salah (@22mosalah) November 11, 2017
Translation: Arab-flavored World Cup "Egypt-Saudi Arabia-Morocco-Tunisia" congratulations to us all.
But after weathering an early storm, including a potential penalty call, Morocco scored two goals in the space of five minutes to put themselves on their way to the finals, where their last appearance was in France in 1998.
Tempers spilled over as the two sides exchanged wild tackles and punches in the closing stages and Ivorian fans pelted the pitch with objects as their frustration boiled over.
Morocco completed the campaign without conceding a goal, finishing on 12 points, four ahead of the Ivorians. Gabon had seven and bottom-placed Mali five.