NELSPRUIT, South Africa -- Togo advanced to the quarterfinals of the African Cup of Nations for the first time at the expense of Tunisia with a controversy-filled 1-1 tie Wednesday night.
South African referee Daniel Bennett was the focus of attention, awarding two questionable penalty kicks to Tunisia and turning down several pleas by both teams for spot kicks.
Tunisia's Khaled Mouelhi converted a penalty kick in the 30th minute but hit an upright with the second in the 78th, a miss that cost his team a place in the quarterfinals. Serge Gakpe scored for Togo in the 13th minute.
Ivory Coast (2-0-1) won Group D with seven points following a 2-2 tie with already eliminated Algeria (0-2-1). Togo and Tunisia were both 1-1-1, and Togo advanced because of a better goal difference, plus-1 to minus-2.
At Rustenburg, Algeria build a 2-0 lead on Sofiane Feghouli's penalty kick in the 64th minute and Hilal Soudani's goal off a header in the 70th. Didier Drogba, returning from a one-game layoff, scored on a header in the 77th and Bony Wilfried tied it three minutes later.
Algeria's Ryad Boudebouz failed to convert a penalty kick seven minutes in.
Ghana meets Cape Verde, and South Africa hosts Mali in Saturday's quarterfinals, followed Sunday by Ivory Coast-Nigera and Burkina Faso-Togo.
For Ivory Coast, Drogba scored in his return to the starting lineup after being dropped in the previous match.
Substitute Sofiane Feghouli opened the scoring for Algeria by converting a penalty kick in the 64th and Hilal Soudani added to the lead with a close-range header in the 70th.
Drogba's first goal of the tournament came from a header in the 77th, and Bony Wilfried netted the equalizer with a shot from outside the area in the 80th.
The Algerians missed a penalty kick just seven minutes into the match at Royal Bafokeng Stadium.