Goalkeeper Djigui Diarra saved twice in the shootout to help 10-man Mali to a 3-2 win via penalties after a 1-1 last 16 draw with Tunisia on Saturday and book an Africa Cup of Nations quarter-final with Senegal.
Tunisia striker Firas Chaouat gave his side the lead in the 88th minute as he lost his marker to guide a deep cross from Elias Saad into the net.
However, Mali were awarded a penalty in stoppage time when substitute defender Yassine Meriah inexplicably used his arm to deflect the ball from a free-kick, and Lassine Sinayoko netted in the 97th minute to send the game to extra time.
Mali had been reduced to 10 men in the 26th minute when Woyo Coulibaly stamped on the ankle of Tunisia's Hannibal Mejbri, and could have few complaints, but put in a battling performance to snatch the win in the shootout.