Youssef En-Nesyri scored the only goal as Morocco beat Ivory Coast 1-0 to qualify for the knockout stages at the Africa Cup of Nations.
En-Nesyri scored after 23 minutes as Herve Renard's side made it successive 1-0 victories in Group D, following their success against Namibia in the opening match.
Romain Saiss made a superb goal-line clearance to deny Jonathan Kodjia in the opening minute before En-Nesyri brilliantly evaded a series of challenges and scored with a low finish.
Max Gradel and Nicolas Pepe worked the Morocco goalkeeper while Kodjia, who scored his side's winning goal against South Africa, was off target this time.
En-Nesyri went close to a second goal with a header and Noussair Mazraoui also could have made it 2-0 late on but his volley crashed against the crossbar from close range.
Morocco advance while Ivory Coast's fate will be decided in their final group game against Namibia.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By PA Sport Staff');
ga('pacontentapi.set', 'dimension2', '3d8a2c9d-62eb-42e8-ace3-8d2c766f4ace');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Morocco beat Ivory Coast to reach Africa Cup of Nations last 16'});