Ivory Coast came back from 2-0 down to force a 2-2 with Algeria in a thrilling Africa Cup of Nations clash at the Royal Bafokeng Stadium in Rustenburg.
The draw means The Elephants, who finish as group leaders with seven points, will meet Nigeria in the quarterfinals at the same venue on Sunday.
Ivory Coast coach Sabri Lamouchi included veteran striker Didier Drogba in his starting line-up to guide the youngsters who were given a run as the team had already qualified for the quarterfinals after winning their first two games.
His inclusion came after an outcry from The Elephants fans who were not happy that their captain was only introduced as a late second-half substitute in their 3-0 demolishing of Tunisia last weekend.
Algeria had similarly positive starts when they suffered defeats against Tunisia (1-0) and Togo (2-0) last week.
But this time they had only pride to play for in their last Group C match as they were already booted out of the competition.
Missed opportunity: Algerian winger Ryad Boudebouz missed a great opportunity to give his side the lead from the penalty spot in the sixth minute as his shot hit the upright. This was after The Elephants defender Ishmael Traore had fouled Soudani Hilal inside the box.
Ivory Coast striker Salomon Kalou wasted a golden chance to break the deadlock in the 15th minute when he ballooned the ball over the crossbar from the edge of the penalty box with only goalkeeper Doukha Izzeddine to beat.
Drogba also lacked composure in front of goal in the 25th minute when his shot was way off target from close range.
Ivory Coast almost suffered a big blow in the 43rd minute when Drogba was stretchered off the pitch after he sustained an ankle injury following a tackle by Boudebouz, but they breathed a huge sigh of relief when their star player made a quick return to the pitch on the stroke of halftime.
Moment of the match: Algerian coach Halilhodzic Vahid introduced midfielder Feghouli Sofiane for the wasteful Boudebouz in the 61st minute and the skilful player rewarded his mentor with a goal from the penalty spot two minutes later with his first touch on the ball after defender Boka Etienne was adjudged to have handled the ball.
Algerian striker Hilal Soudani caught the Ivory Coast defence napping when he made it 2-0 in the 69th minute with a great header following a terrific cross from the right flank.
The second goal jolted Ivory Coast back into the match and Drogba pulled one back in the 76th minute through a great header to reduce the margin.
The Elephants midfielder Boni Wilfried levelled matters in the 81st minute through a thunderous shot that was deflected into the net by Algerian defender Eddine Mesbah.