Algeria crashed out of the African Nations Cup at the group stage as Islam Slimani's brace was not enough to beat a much-changed Senegal side in Franceville.
Senegal were already assured of topping Group B but despite showing 10 alterations from their previous game, they still had enough to hold Georges Leekens' side to a 2-2 draw.
Leicester striker Slimani struck in either half but saw Pape Diop and Moussa Sow cancel out his efforts - although even victory would not have been enough as Tunisia beat Zimbabwe to take second spot.
Slimani opened the scoring on 10 minutes with his first goal of the finals, finishing off Sofiane Hanni's cross from six yards to put Algeria ahead.
There was almost a second moments later but Hanni could not head Riyad Mahrez's corner on target.
Mahrez could have widened the margin just after the half-hour mark but saw his low effort saved by Cheick N'Diaye in the Senegal goal after a fine exchange of passes with Yacine Brahimi.
Senegal equalised just before the interval as Diop sent a bouncing half-volley past Malik Asselah after Aissa Mandi's header fell to the Espanyol midfielder.
It was Leicester pair Mahrez and Slimani who combined to put Algeria back in front after 52 minutes, the former seeing an untidy finish just cross the line from his club-mate's cross.
But the lead lasted little more than a minute as Sow's low drive brought Senegal level for the second time in the contest.
Slimani should have completed his hat-trick in the latter stages but missed the target when clean-through on goal as he and Mahrez now return to help Premier League champions Leicester improve their fortunes.