Dellahi punished some lax defending in the 36th minute to hand his side a 1-0 win.
Algeria crashed out of the Africa Cup of Nations as Mohamed Dellahi’s first-half goal proved enough to earn Mauritania a shock first-ever 1-0 win in the tournament and a ticket to the last 16.
Dellahi punished some lax defending in the 36th minute and – despite a second-half onslaught – two-time tournament winners Algeria could not find a response as they finished bottom of their group for a second consecutive AFCON, while Mauritania go forward as one of the best third-placed teams.
After two successive draws had left them in trouble, Algeria coach Djamel Belmadi dropped Riyad Mahrez to the bench as he tried to freshen up his side but it did not work as Mauritania proved stubborn opponents.
Algeria dominated possession and Adam Ounas tried to catch out Babacar Niasse, shaping to cross and hitting a vicious inswinging shot the goalkeeper did well to claw behind.
But Mauritania stunned Algeria late in the half. Anthony Mandrea pushed away a stinging shot from Souleymane Anne, but Algeria could not clear the resulting corner and when Omare Gassama’s shot was blocked, the ball fell for Dellahi to fire in, giving Mauritania their first ever lead in AFCON play.
Mahrez came on at the break as Algeria tried to turn up the heat but Mauritania remained a threat, and Aboubakary Koita wriggled his way past three defenders in the box before sending an off-balance shot over.
At the other end, Niasse came tearing off his line to cut out Ramiz Zerrouki’s long ball forward, but needed Ibrahima Keita to scramble back and block Youcef Belaili’s shot at his unguarded goal.
Algeria were looking desperate but it was Mauritania who had the late chances to score, with Lamine Ba hitting the crossbar before Guessouma Fofana was denied by the goalkeeper.
Eleven minutes were added on and Algeria went agonisingly close again, with Baghdad Bounedjah poking the ball inches wide after Aissa Mandi’s shot was blocked by Niasse, but it was Mauritania’s night.