Ivory Coast marched into the last 16 of the Africa Cup of Nations and sent holders Algeria crashing out with a 3-1 victory at Japoma Stadium.
Algeria needed a win to stay in the tournament, but the sorry defending champions are heading home after finishing bottom of Group E.
Ivory Coast exploited Les Fennecs' frailties to cruise through as group winners and set up a showdown with Egypt, Franck Kessie setting them on their way by volleying in with his left foot to finish off a slick move midway through the first half when Nicolas Pepe squared the ball into his path.
Ibrahim Sangare capitalised on terrible defending to double their lead with a free header six minutes prior to half-time and Pepe was allowed to run forward unchallenged before picking his spot to add a third goal early in the second half.
Riyad Mahrez rattled the right post with a penalty after Simon Deli was adjudged to have fouled Youcef Belaili before Sofiane Bendebka scored Algeria’s first goal of the tournament with a header 17 minutes from time.
Sebastien Haller had what he thought was the Elephants' fourth goal ruled out for offside right at the end, but they gained sweet revenge for a defeat to Algeria at the quarter-final stage of the 2019 showpiece.