Oyem - Defending champions the Ivory Coast were sent packing from the Africa Cup of Nations on Tuesday after losing 1-0 to a Morocco side coached by their old boss Herve Renard.
A brilliant Rachid Alioui goal gave Morocco the victory in Oyem in northern Gabon as the Atlas Lions marched on to the quarter-finals alongside DR Congo.
An impressive Congolese side eased to a 3-1 win against Togo in the night's other game in Port-Gentil as they sealed top spot in Group C.
But it is the elimination of the Elephants, winners in 2015 after a penalty shoot-out against Ghana, that overshadows all else.
Their departure is the latest blow to the tournament following premature exits for hosts Gabon and much-fancied Algeria in the last few days.
And for the fourth consecutive Cup of Nations, the reigning champions will be absent from the quarter-finals, but the winning coach from two years ago will be in the last eight.
The blond, bronzed 48-year-old, wearing his lucky white shirt, hopes to become the first coach to win three Cup of Nations titles with three different countries having also won it with Zambia in 2012.
"Today we beat the Ivory Coast on a bad pitch that proved to be a leveller. Now a new competition begins with the knockout matches, which will be much like this one, and we will need a winning mentality," Renard said.
Alioui, of French second-tier side Nimes, curled in a sublime long-range effort at the end of a counterattack just past the hour mark to break the deadlock and leave the Ivorians needing to score twice to stay alive. They could not.
Also read: Ivory Coast among many Africa title hopefuls
"It is an immense disappointment. My thoughts go out to all Ivorians who are going through a difficult time," said their French coach Michel Dussuyer.
"I take responsibility. We did not fulfil our objectives. Our ambition was to get past the first round and retain our title. It is going to be a difficult night," he added as he refused to be drawn on his future in the job.
- DRC underline credentials -
As the Ivorians prepare to go home, Morocco will now head to Port-Gentil for a quarter-final while DR Congo make their way back to Oyem.
Florent Ibenge's side needed just a draw to qualify but a 3-1 win over Togo secured top spot and the manner of their performance on a shocking pitch suggests the 2015 semi-finalists must be seen as genuine contenders to win the trophy now.
Junior Kabananga fired past Togo's substitute goalkeeper Cedric Mensah for the opener just before the half-hour mark and he also headed against the post prior to the interval.
Neeskens Kebano of Fulham lobbed in the second goal nine minutes into the second period after latching onto Marcel Tisserand's punt downfield.
Kodjo Fo-Doh Laba pulled one back for Togo but a Paul-Jose Mpoku free-kick with 10 minutes left that struck the underside of the bar and came down just over the line secured the win.
"Having gone top of the group after two rounds of games we needed to remain vigilant and we did that," said Ibenge.
"They gave us a fright after we had gone 2-0 up and had we not matured as a team thanks to the two years we have spent together we might have panicked."
Togo and their captain Emmanuel Adebayor were given a guard of honour at the end by the Congolese players but they go home having failed to register a win.
The group stage concludes on Wednesday when Ghana and Egypt clash in Port-Gentil and Mali meet already-eliminated Uganda in Oyem in Group D.
Egypt need a draw to secure progress to the last eight along with Ghana, but if they slip up Mali could take advantage by beating the Ugandans.
For the latest on
national news, politics, sport, entertainment and more follow us on Twitter and
like our Facebook page.