Tournament favourites and Group D winners Ivory Coast battled back from two goals down to draw 2-2 with already-eliminated Algeria who at least left the Africa Cup of Nations on Wednesday with their pride restored.

All four goals came in a 16-minute spell in the second half with Algeria taking the lead in the 64th minute with substitute Sofiane Feghouli scoring two minutes after coming on for Ryad Boudebouz, who missed a penalty in the first half.

They doubled their lead six minutes later when Hilal Soudani thundered in a header after escaping his marker and meeting a long perfect cross from Feghouli wide on the right.

Leading the charge: Didier Drogba, the Ivory Coast captain, was back to his best as he inspired a comeback from two down against Algeria

The Ivorians, who had already qualified for the knock out stages before Wednesday's match, struck back in the 77th minute when Didier Drogba outjumped the defence to head home.

They equalised three minutes after that when a powerful shot from Wilfried Bony took a huge deflection off Algerian defender Djamel Mesbah.

Algeria were eliminated after losing their opening two games to Tunisia and Togo, while Ivory Coast boss Sabri Lamouchi rested nine players ahead of Sunday's quarter-final against Nigeria in Rustenburg.

Drogba returned to the Elephants' starting line-up but whether that was to give him more match time after his two-month layoff following the end of the Chinese season in November or because he is no longer regarded as a first choice striker will be seen when Lamouchi names his side to face Nigeria.

Drogba, who looked unimpressive in the opening two matches, did look far more involved in an admittedly low-key game and should have scored five minutes before half-time but fired over the bar after cleverly creating an opening at the edge of the box.

His perseverance paid off and he made no mistake with his well-taken goal that brought Ivory Coast back into the game.