Algeria have qualified for the quarter-finals of the Africa Cup of Nations as Group C runners-up thanks to a 2-0 victory over Senegal in Malabo.
Senegal started the day as group leaders but crash out of the tournament because of Ghana's late win over South Africa in Mongomo.
Algeria got off to a fast start and took the lead in the 11th minute after Sofiane Feghouli had spurned a second-minute opening to put them ahead.
Leicester City's Riyad Mahrez was the scorer, producing a cool finish after being allowed into the penalty area by the Senegal backline.
Chances were limited for both sides before half time and Algeria continued to frustrate Senegal following the interval.
Sadio Mane screwed a half-chance wide for Senegal before Saphir Taider missed an opportunity to double Algeria's lead.
The Greens wouldn't regret Taider's miss, though, as Tottenham Hotspur's Nabil Bentaleb bulleted a long-range strike home with eight minutes left on the clock.
Algeria finish level on points with Ghana at the top of the group, going through as runners-up because Ghana beat them in their meeting on Friday.