Garra Dembele and Seydou Keita were on the scoresheet as Alain Giresse's men came from behind to avoid an early exit
A 2-1 victory over Group D's bottom side Botswana was enough to see Mali progress to the knockout stages of the Africa Cup of Nations.
A static first half was followed by a deft finish from Mogakolodi Ngele, who gave Stanley Tshosane’s side the lead before Garra Dembele and Seydou Keita scored vital goals to put their team into the quarter-finals.
Mali went into the match knowing that they had to match or beat Guinea’s result against Ghana in the group's other clash, and the first half was characterised by great imagination, but poor execution from both sides.
Botswana had a string of chances before the break. Mogakolodi Ngele blasted a left-footed shot over from the edge of the area when he should have tested Oumar Sissoko in the Mali goal, before a Tshepo Motlhambankwe snapshot from a poorly cleared corner went narrowly over a perturbed Sissoko’s goal.
The best chance of the match fell to Botswana defender Lemponye Tshireletso, who ran onto a neat back-heel from Ndiapo Letsholathebe, but was only able to scuff a poor effort wide of the goal.
Mali, however, were not without chances of their own. Modibo Maiga and Bakaye Traore took it in turns to send efforts narrowly over, before Dembele went on a great run down the left, before sending in a tantalising cross that evaded everyone in the Botswana boss.
Shortly after the break, the game got exactly what it needed. Moemedi Moatlhaping played the ball across the face of goal and Mogakolodi Ngele made a late run into the penalty are to send his nation in front with a slick left-footed finish into the corner.
Going behind only served to spring Mali into life. Minutes later, Abdou Traore crossed the ball to Bayake Traore at the far post. The 26-year-old forced a great save from Modiri Marumo, but the ball fell to Demble, who seized his opportunity to get his nation back on level terms.
From that point on it was all Mali. Dembele sent a hooked shot over the bar before Ousmane Coulibably went on a mazy run, only to send a toe-poke against the bar.
They finally went ahead when Seydou Keita played a clever one-two with Cheick Diabete, and placed a beautiful left-footed strike into the corner of the goal.
In the end, that was enough to ensure Mali's passage into the knock-out stages, where they will play Gabon.