Morocco sealed its place in Russian Federation in style as they went to Abidjan and beat Cote d'Ivoire 2-0.
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.
Libya avoided last place in the group with the draw as they advanced to four points, with Guinea staying on three.
They'll join Nigeria, Egypt and Senegal as the continent's five representatives at next year's tournament in Russian Federation.
Ivory Coast manager Marc Wilmots has revealed that he was hoping to have Tiemoue Bakayoko starting in his midfield, but the Chelsea midfielder opted for France.More news: AT&T CEO says open to litigation on Time Warner deal
More news: Pakistan allows Kulbhushan Jadhav's wife to meet him in jail
More news: United States anxious AT&T and Time Warner would hike costs for media rivals
Dirar´s cross from the right evaded both a diving Khalid Boutaib and the Ivorian goalkeeper Sylvain Gbohouo to give Morocco a 25th-minute lead.
Nabil Dirar scored during the the first half time, Mehdi Benatia did the same minutes later.
Morocco will be making their fifth appearance.
DR Congo, meanwhile, had needed Libya to pull off a shock win to give them hope of making it to Russian Federation, but were left disappointed despite a 3-1 win over Guinea in Kinshasa, scoring twice in stoppage time.
Group A leaders Tunisia welcomed Libya to Rades, a short distance from capital Tunis, knowing a loss could see them miss out if second-placed DR Congo beat Guinea elsewhere.
Group E finishes on Sunday with Egypt travelling to Ghana while Group D winners Senegal can celebrate with a dead rubber against South Africa on Tuesday (Wednesday NZT).