Islam Slimani scored a goal in each half but Algeria's Africa Cup of Nations campaign limped to a winless close as they drew 2-2 with a much-changed Senegal in Franceville.
The Desert Warriors entered the final round of Group B matches on Monday knowing nothing less than victory and a shock win for Zimbabwe over Tunisia would prolong their participation in the tournament.
Senegal – already through to a mouthwatering quarter-final against Cameroon at the same ground on Saturday – made 10 alterations but Georges Leekens' misfiring stars were still unable to ease the pain of missing out on a knockout berth.
Papakouli Diop and Moussa Sow were on hand to cancel out efforts from Leicester City striker Slimani, whose embattled expression when he was substituted late on neatly encapsulated a tournament of wasteful underachievement for his country in Gabon.
Senegal started brightly despite their unfamiliar line-up but Algeria hit the front after 10 minutes as Sofiane Hanni burst into space down the left and crossed for Slimani to plant a back-post volley into the roof of the net.
News filtered through moments later that Tunisia were ahead in Libreville, although Algeria pressed on regardless – Anderlecht midfielder Hanni glancing a header wide from Riyad Mahrez's corner.
Asselah Malik was out sharply to deny Senegal forward Sow but, as Tunisia put a second and then a third past Zimbabwe it became increasingly clear he was defending a lost cause.
Algeria's mood was hardly improved by some poor refereeing in the 30th minute – Sow's free-kick striking the wall, where Slimani was incorrectly punished for handball before Fenerbahce striker Sow sent his more advanced attempt wide from 20 yards.
Mahrez latched on to a fine Yacine Brahimi pass to call Senegal goalkeeper Khadim N'Diaye into action but Algeria appeared to be losing their composure in the face of elimination as Faouzi Ghoulam and Nabil Bentaleb picked up bookings within a minute of one another.
Two minutes before the break, Diop interrupted an increasingly scrappy and physical contest with the Senegal equaliser.
Metz youngster Ismaila Sarr tore down the left and Algeria captain Aissa Mandi could only loop a headed clearance to as far as the Espanyol midfielder, whose bouncing volley beat an unsighted Malik from the edge of the box.
Leekens' men momentarily restored their advantage in the 53rd minute, with Mahrez springing the offside trap and crossing for his club-mate Slimani to chest down and miscue a shot that got the better of Cheikh Ndoye's best efforts on the line.
Sow restored parity 91 seconds later, lashing low into the net after Sarr collected Diop's lay-off and ran into traffic.
Slimani was unable to connect sufficiently with a header to seal his hat-trick, while N'Diaye almost made a hash of Hanni's long-range drive in the 75th minute.
The Leicester man then slotted wide when through on goal, but the matchball would have served as scant consolation, and Mahrez sidefooted over when presented with the chance to secure a meaningless victory two minutes from time.