Senegal to face Tunisia
The width of a post denied Senegal a comfortable quarter-final tie with Guinea as a 1-1 draw with Mali left them second in Group B and facing a daunting quarter-final against hosts Tunisia.
Liverpool's El Hadji Diouf could only watch on in agony as his left-foot shot smacked against the upright in the 72nd minute. Had the ball gone in and Senegal held on, they would have won the group.
Instead it is Mali, who rested Tottenham striker Freddy Kanoute, who will face Guinea in the knockout stage after topping the group with seven points from three matches.
Mali went ahead thanks to Dramane Traore's 34th-minute header, with Habib Beye equalising for Senegal in first-half stoppage time.
The Tunisia-Senegal game sets up the most fascinating contest of the tournament to date. The hosts are desperate for success having failed to get beyond the group stage last time they staged the tournament.
Senegal, by contrast, went into the event as one of the strong favourites and are keen to avenge being beaten in the final on penalties by Cameroon two years ago.
In the day's other game, Kenya, playing at their fifth African Nations Cup finals, finally won their first ever game when they beat Burkina Faso 3-0 to finish third in Group B.