Mali secured top spot in Group E of the Africa Cup of Nations after a 1-0 win over Angola, who failed to progress to the knockout stage.
Angola threatened early on when Gelson Dala went through, but could not beat goalkeeper Djigui Diarra.
At the other end, Toni Cabaca saved well from first Adama Traore and then Falaye Sacko before Mali striker Kalifa Coulibaly nodded just wide from a corner.
The West African side, though, took the lead in the 37th minute through a long-range effort from RB Leipzig midfielder Amadou Haidara.
Mali progress to a second-round showdown against the Ivory Coast in Suez on July 8, while Angola head home. Tunisia went through as runners-up despite a goalless draw against Mauritania, and will next play Ghana.
Tuesday's results also mean South Africa edge into the last 16 after ranking fourth out of the best third-placed teams, which will see the Bafana Bafana take on hosts Egypt in Cairo on Saturday.