Former champions Algeria crashed out of the Africa Cup of Nations in the group stage on Tuesday after a shock defeat against Mauritania.
Algeria won their second AFCON title in Egypt in 2019 but were then sent packing in the group stage at the last edition in Cameroon two years ago with just one point and one goal scored.
This campaign has been equally miserable for Djamel Belmadi's team, who drew their first two matches in Group D against Angola and Burkina Faso but would have qualified for the knockout phase with a point against Mauritania in Bouake.
Yet Mauritania, who had lost their opening two matches in Ivory Coast and had never won in eight previous attempts at the AFCON, ran out 1-0 winners thanks to a 37th-minute goal by captain Mohamed Dellah Yaly, who plays his club football in Iraq.
Mauritania make history
The result relegated Algeria - who started the game with off-form Riyad Mahrez on the bench - to bottom spot in their group and they head home having now gone six Cup of Nations matches without winning since beating Senegal 1-0 in the 2019 final.
Mauritania, meanwhile, are now certain to advance to the knockout phase for the first time in their history as one of the four best third-placed teams.
"Nobody was thinking about Mauritania, but football is like that, full of surprises, and we have been rewarded for all the hard work we have put in," Mauritania coach Amir Abdou told broadcaster Canal Plus Afrique.
The group stage concludes on Wednesday, with South Africa playing Tunisia and Namibia facing Mali in Group E, while Tanzania take on the Democratic Republic of Congo and Zambia meet Morocco in Group F.
➤Click here to follow our WhatsApp channel for more stories.