Defending champions Senegal secured top spot in Group C at the 2023 Africa Cup of Nations after beating Guinea 2-0 in an ill-tempered encounter.
Abdoulaye Seck headed the Teranga Lions in front from a free-kick and Iliman Ndiaye sealed victory with a fine low finish in the final minute.
Guinea knew they would go through before kick-off and finished third after Cameroon beat The Gambia 3-2.
Senegal progress from the group stage as the only side with a 100% record.
Aliou Cisse’s side will stay in Yamoussoukro and face a third-placed side from Group A or F in the last 16 on Monday, while Guinea will play Group A winners Equatorial Guinea on Sunday in Abidjan.
The Syli National finished third behind Cameroon on goals scored, with their four-point tally meaning four-time continental champions Ghana were eliminated from the finals after the Black Stars ended third in Group B on two points.