It is the fifth time in the last six Cups of Nations that the reigning champions have failed to make the AFCON knockout phase, but there has arguably never been a worse title defence.
Algeria came to the tournament on an unbeaten run stretching back over three years but they were held by Sierra Leone in their opening match and then lost to Equatorial Guinea to suffer a first defeat in 36 games.
They finish bottom of their group with a single point.
"A failure, simple as that," was how Belmadi summed up their tournament.
"We never managed to take our chances, right from the start of the competition. Even penalties we had difficulty with. We just weren't good enough."
Their demise was lapped up by the fans at the Japoma Stadium, with the 50,000-capacity ground filling up as the game went on.
The crowd was given as just over 30,000, the maximum that could be allowed in due to the 60 percent capacity limit imposed as part of coronavirus restrictions, but it looked like more than that. Many fans invaded the pitch in chaotic scenes of celebration at the end.
The Ivory Coast, the 2015 champions, clearly had the backing of the crowd and they will stay in Douala for a heavyweight last-16 tie against Mohamed Salah's Egypt next Wednesday.
"I am very, very satisfied about what my team has done tonight," said the Ivory Coast's French coach, Patrice Beaumelle, who has twice won the AFCON as an assistant coach and had some sympathy for Algeria and their failed attempt to retain the title.
"It is always difficult because it is a coveted trophy and when we won it with Zambia in 2012 that inspired a lot of teams as well."
Equatorial Guinea go through in second place in Group E after defeating Sierra Leone 1-0 in Limbe thanks to a superb first-half strike from Pablo Ganet.
Kei Kamara missed a penalty for Sierra Leone as they go out while Equatorial Guinea stay in Limbe for a last-16 tie against Mali on January 26.
Mali finished top of Group F after a 2-0 win over west African neighbours Mauritania in the late game in Douala, with Massadio Haidara giving them a second-minute lead before Ibrahima Kone added a penalty early in the second half.
It was a third successful penalty in as many games for Norway-based striker Kone, as Mauritania go home without a point or a goal.
Tournament debutants Gambia had already sealed a place in the knockout phase before claiming a remarkable 1-0 win over Tunisia in their last group match in Limbe.
Ablie Jallow's goal deep in injury time gave Gambia the victory and they will now play Guinea in the last 16 in Bafoussam on Monday.
Tunisia were deprived of 12 players who tested positive for Covid-19 on the eve of the game, including star man Wahbi Khazri, and they have to settle for advancing as one of the four best third-placed teams.
That means the 2004 champions have a quick turnaround and must head north to play Nigeria -- the only team to win all three group games -- in Garoua on Sunday.
Thursday's results also allowed the Comoros, the small Indian Ocean island nation, to progress to the last 16 in their first appearance at the tournament.
They will face hosts Cameroon in the last 16.