Tunisia and South Africa filled the final two places for the round of 16 after a tense finish to the group stage in Egypt.

Egyptian fans hold posters of their star striker Mohamed Salah prior to the African Cup of Nations group A soccer match between Egypt and Uganda in Cairo International Stadium in Cairo, Egypt, Sunday, June 30, 2019.
Egyptian fans hold posters of their star striker Mohamed Salah prior to the African Cup of Nations group A soccer match between Egypt and Uganda in Cairo International Stadium in Cairo, Egypt, Sunday, June 30, 2019. (AP)

The African Cup of Nations brings the likes of superstars such as Sadio Mane, Mohamed Salah, and Riyad Mahrez on to the same field as Madagascar's Jean Romario Baggio Rakotoarisoa, who plays in the country's ramshackle league, and Selemani Ndikumana, who lived through the long civil war, which ravaged Burundi until 2005.

Ivory Coast fan cheers before the African Cup of Nations group D soccer match between Morocco and Ivory Coast in Al Salam Stadium in Cairo, Egypt, Friday, June 28, 2019.
Ivory Coast fan cheers before the African Cup of Nations group D soccer match between Morocco and Ivory Coast in Al Salam Stadium in Cairo, Egypt, Friday, June 28, 2019. (AP)

The tournament began with what has become almost a traditional prelude: a team arguing over bonuses.

Cameroon initially refused to fly to Egypt and, even when they were eventually persuaded to travel, the players said they were still not satisfied with the offer. Pay disputes subsequently affected Nigeria, Zimbabwe, and Uganda.

Egypt's forward Mohamed Salah celebrates after scoring a goal during the 2019 Africa Cup of Nations (CAN) football match between Egypt and DR Congo at the Cairo International Stadium on June 26, 2019.
Egypt's forward Mohamed Salah celebrates after scoring a goal during the 2019 Africa Cup of Nations (CAN) football match between Egypt and DR Congo at the Cairo International Stadium on June 26, 2019. (AFP)

Newcomers Madagascar provided romance as they beat Nigeria on the way to topping their group, a remarkable achievement for a motley collection of players from the lower leagues in France and clubs in Belgium, Bulgaria and the United States, and led by former French fourth-tier coach Nicolas Dupuis.

Madagascar's midfielder Lalaina Nomenjanahary celebrates after scoring a goal during the 2019 Africa Cup of Nations (CAN) Group B football match between Madagascar and Nigeria at the Alexandria Stadium on June 30, 2019
Madagascar's midfielder Lalaina Nomenjanahary celebrates after scoring a goal during the 2019 Africa Cup of Nations (CAN) Group B football match between Madagascar and Nigeria at the Alexandria Stadium on June 30, 2019 (AFP)

Uganda reached the knockout stage for the first time in 41 years and Benin, taking part at their fourth AFCON, made it past the group stage for the first time although they still have to win a match at the finals. They drew all their games.

The most impressive sides were the North African trio of Egypt, Morocco, and Algeria who all topped their groups with a 100 per cent record and without conceding any goals.

Algeria's defender Mehdi Tahrat (2nd-L) vies for the ball with Tanzania's goalkeeper Metacha Mnata (R) during the 2019 Africa Cup of Nations (CAN) Group C football match between Tanzania and Algeria at the Al Salam Stadium in the Egyptian capital Cairo on July 1, 2019.
Algeria's defender Mehdi Tahrat (2nd-L) vies for the ball with Tanzania's goalkeeper Metacha Mnata (R) during the 2019 Africa Cup of Nations (CAN) Group C football match between Tanzania and Algeria at the Al Salam Stadium in the Egyptian capital Cairo on July 1, 2019. (AFP)

Algeria looked particularly strong although it was not pretty as they committed an average of 28 fouls a match, according to official statistics.

Ivory Coast's forward Jonathan Kodjia (UP)shoots on goal in front of South Africa's goalkeeper Rowen Williams during the 2019 Africa Cup of Nations (CAN) football match between Ivory Coast and South Africa at the Al Salam Stadium in Cairo on June 24, 2019.
Ivory Coast's forward Jonathan Kodjia (UP)shoots on goal in front of South Africa's goalkeeper Rowen Williams during the 2019 Africa Cup of Nations (CAN) football match between Ivory Coast and South Africa at the Al Salam Stadium in Cairo on June 24, 2019. (AFP)
Egyptian fans hold posters of their star striker Mohamed Salah prior to the African Cup of Nations group A soccer match between Egypt and Uganda in Cairo International Stadium in Cairo, Egypt, Sunday, June 30, 2019.
Egyptian fans hold posters of their star striker Mohamed Salah prior to the African Cup of Nations group A soccer match between Egypt and Uganda in Cairo International Stadium in Cairo, Egypt, Sunday, June 30, 2019. (AP)
A seller holds up flags of African countries at a shop, as he prepares for the Africa Cup of Nations, at Al Ataba, Cairo, Egypt June 16, 2019.
A seller holds up flags of African countries at a shop, as he prepares for the Africa Cup of Nations, at Al Ataba, Cairo, Egypt June 16, 2019. (Reuters)
Senegal's Moussa Konate, center, duels for the ball with Kenya's Joseph Okumu, left, and Kenya's Victor Wanyama during the African Cup of Nations group D soccer match between Kenya and Senegal in 30 June Stadium in Cairo, Egypt, Monday, July 1, 2019.
Senegal's Moussa Konate, center, duels for the ball with Kenya's Joseph Okumu, left, and Kenya's Victor Wanyama during the African Cup of Nations group D soccer match between Kenya and Senegal in 30 June Stadium in Cairo, Egypt, Monday, July 1, 2019. (AP)
Source: TRTWorld and agencies