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.

Cote d' Ivoire (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 Cote d' Ivoire-Nigera and Burkina Faso-Togo.