Holders Cameroon were held 0-0 by Benin on Tuesday, their second successive goalless draw at the Africa Cup of Nations, pushing them into a last-16 tie against Nigeria while their opponents made it past the group stage for the first time.
Cameroon's Yaya Banana headed against the bar late on but it was a toothless performance by the Indomitable Lions who had already qualified from Group F but were edged into second place on goals scored by Ghana, who beat Guinea Bissau 2-0.
Benin, who are at the finals for the fourth time but have still not won a match, drew all three games, enough to secure a place in the knockout stage as one of the best third-placed teams. Ghana and Cameroon finished level on five points.