Defending champions Algeria have been knocked out of the Africa Cup of Nations after losing 3-1 to Ivory Coast in their final group game.
The 2019 champions were completely outplayed in Douala on Thursday, compounding a miserable tournament in which they failed to win a single game.
Algeria had needed to win to progress from Group E but were rocked by a fine volley from Franck Kessie and a powerful header by Ibrahim Sangare in the first half.
Arsenal’s Nicolas Pepe put the result beyond doubt with a fine individual goal nine minutes into the second half.
Manchester City’s Riyad Mahrez missed the chance to pull one back when he hit the post from a penalty just before the hour.
Sofiane Bendebka did score – Algeria’s first goal of the competition – with a header on 73 minutes, but it proved mere consolation.
Ivory Coast’s victory ensured they would win the group and go through to a last-16 clash with Egypt.
Equatorial Guinea also went through as runners-up after beating Sierra Leone 1-0 in Limbe.
Sierra Leone’s veteran striker Kei Kamara has a late penalty saved to scupper their chances of reaching the next round.
Pablo Ganet’s 38th-minute strike proved the difference, but Sierra Leone might have gone through as one of the best third-placed finishers if they had forced a draw.
The result also means the Comoros Islands are through as one of the best third-placed finishers after their surprise 3-2 win over Ghana on Tuesday.