Morocco football team
Mane sinks Egypt again, Partey sends Ghana to World Cup
Cameroon, Ghana, Morocco and Tunisia also booked their places in the finals on a frantic night of play-off action.
Achraf Hakimi scored a brilliant free-kick to send Morocco through to the quarterfinals of the Africa Cup of Nations after a 2-1 win over Malawi on Tuesday.
The Black Stars had captain Andre Ayew sent off after 25 minutes and, after wiping out a two-goal deficit, lost when Comoros' Ahmed Mogni scored his second goal five minutes from time.
Mane, who switched to Liverpool in 2016 after two years with the Saints, netted a penalty seven minutes into added time to deliver a fortunate 1-0 Group B victory over Zimbabwe in Bafoussam.
Both countries qualified for the last 16 after three wins from three group games, but it was the nature of Algeria's victory over Senegal that caught the eye of coach Herve Renard.
Bafana Bafana's hope of reaching the knockout stages of the Africa Cup of Nations is out of their hands, after losing 1-0 to Morocco on Monday.