Defending champions Algeria crashed out of the Africa Cup of Nations with a 3-1 defeat against Ivory Coast in Douala.
Needing a win to stay alive, Algeria trailed by two goals at the break after Franke Kessie capped off a fine move and Ibrahim Sangare headed home.
Arsenal’s Nicolas Pepe put the Ivorians 3-0 up before Algeria captain Riyad Mahrez hit a penalty against the post.
Algeria, for whom Sofiane Bendebka scored a late consolation, exit bottom of Group E after a torrid campaign.
Djamel Belmadi’s men are the third holders to exit at the first hurdle in the past five Nations Cup finals.
Their departure from the competition is in marked contrast to their entry, travelling to Cameroon on a 34-match unbeaten run and looking to surpass Italy’s all-time record of 37.
The Algerians had drawn 0-0 with Sierra Leone before a 1-0 defeat by Equatorial Guinea, and leave with just one point from three games – but did at least finally get on the scoresheet in Cameroon when substitute Bendebka’s late goal inspired a brief rally.
Ivory Coast’s Elephants topped the group to line up a mouth-watering last-16 match with Egypt, scheduled for Douala on Wednesday, 26 January.
Algeria coach Belmadi had been baffled by his team’s lack of goals and when Ismael Bennacer clipped the post after 22 minutes, only for the Ivorians to score a minute later, he must have sensed the worst.