Midfielder Seydou Keita scored 15 minutes from time as Mali came from behind to beat Botswana 2-1 in Libreville to advance to the African Nations Cup quarter-finals.
Mali finished second in Group D, behind Ghana, and set up a meeting on Sunday with co-hosts Gabon in Libreville.
Mali proved unconvincing in the match, watched by a 5,000 crowd, but Guinea’s failure to beat Ghana in the other group game in Franceville ensured their progress.
s