LIBREVILLE: Rachid Alioui scored a spectacular winner for Morocco to defeat holders Ivory Coast 1-0 and advance to the quarter-finals of the African Nations Cup finals at the expense of the defending champions.

French-born Alioui netted from 35 metres to take coach Herve Renard’s side into the knockout stages and end the hopes of the country the latter led to the continental title two years ago in Equatorial Guinea.

Morocco finished runners-up in Group C with six points, one behind pool winners the Democratic Republic of Congo. The fancied Ivorians, who managed just two goals and two points in their three matches in Gabon, had to settle for third.

Ivory Coast joined two other high-profile first-round casualties already knocked out of the tournament, Algeria and hosts Gabon.

It took 25 minutes for the first real threat to either goal and it was Morocco who went close as Faycal Fajr’s free kick had the beating of Ivory Coast keeper Sylvain Gbohouo but cannoned back off the crossbar.

In a half of few chances, the next two fell the way of Ivory Coast and they should have profited from at least one of them.

international Wilfried Zaha in acres of space on the left-hand side of the box but the Crystal Palace winger’s shot was straight at the Moroccan keeper.

A minute before the break Wilfried Bony’s flick-on found Kalou at the back post but his header hit the woodwork and the chance was gone.

The first 20 minutes of the second period saw the Ivorians have the majority of the possession but a swift break from Morocco led to substitute Alioui’s decisive moment.

The 24-year-old, who plays for Nimes in the French second division, picked up the ball, spotted Gbohouo off his line and masterfully curled his shot into the top corner.

The North African side soaked up some heavy Ivorian pressure after that but were able to comfortably see out the game to set up a quarter-final meeting on Sunday with the winners of Group D.

That will be either Ghana or Egypt, who clash on Wednesday in Port Gentil for top spot, with the former needing just a draw to secure the pool win.