Morocco are well on course to reach the last four of the 2014 African Nations Championship as three goals in seven minutes have put them in control of their quarter-final tie against Nigeria in Cape Town.
The first chance of a cagey opening to the game came after an Abdelkadir El Ouadi one-two with Mouhssine Iajour, but his goal-bound effort was blocked by Odunlami Kunle.
Nigeria's best opening came moments later when Ifeanyi Ede's run down the right-hand side and cross found Gbolahan Salami, but his volley didn't trouble the Moroccan goal.
However, that was the best moment of the half as Nigeria's hopes fell apart when first El Ouadi played in Mouhssine Moutouali, who netted on 33 minutes.
The Super Eagles were still trying to recover when Iajour slipped the ball beyond Chigozie Agbim to put the Moroccans 2-0 on 37 minutes.
With Nigeria's hopes of progressing hanging by a thread, Nigeria slipped further behind El Ouadi found Moutouali again and his low drive from the edge of the area was too good for Agbim and a Morocco victory seemed certain five minutes before the interval.
The defending champions had got through the last eight after beating hosts South Africa in their final group game, while Morocco topped their group after completing a 3-1 win against Uganda.