Mali beat Gabon 5-4 on penalties here Sunday after this finely balanced Africa Cup of Nations quarter-final ended 1-1 following extra time.
Barcelona star Seydou Keita converted the decisive spot kick after the co-hosts' top striker Pierre-Emerick Aubameyang watched in disbelief as Mali keeper Soumaila Diakite saved his effort.
The Eagles' reward is a semi-final date with Ivory Coast back at Libreville's L'Amitie stadium on Wednesday.
For Gabon, who were unbeaten in the first round, this was a cruel end to their campaign, reviving as it did memories of their defeat on penalties to Tunisia in their only other quarter-final appearance in 1996.
Gabon's attempted charge into the last four was spearheaded by the 2012 Nations Cup joint top scorer Aubameyang and Daniel Cousin, the captain, retaining his place.
Mali welcomed back midfielder Samba Diakite from suspension, with Garre Dembele dropping to the bench, and keeper Diakite coming on for Oumar Sissoko.
Among the crowd were the Gabon president and his First Lady sporting as usual the Panthers' yellow shirt.
The Panthers, displaying their customary zest and endeavour, were showing good early pace down the wings, especially Eric Mouloungui on the right, with the ever dangerous presence of Cousin waiting to pounce in the Mali box.
Aubameyang had the first gilt-edged chance appproaching the half hour, beating the offside trap to flick the ball past Soumaila Diakite only to see his effort hit the far post.
As the first half wore on Gabon began to look the more dangerous - the Mali keeper did well to keep tabs on Mouloungui's menacing low 25m freekick in the 42nd minute.
Gabon got the goal they deserved in the 55th minute when Aubameyang raced onto a high ball from the left, his back pass across the box falling to Mouloungui to slam past Diakite.
That was the Nice forward with the mohican haircut's fifth and most important international goal.
Seconds later down at the other end Didier Ovono Ebang's gloves punched away Mali striker Modibo Maiga's attempt at an equaliser.
As the game exploded Cousin almost bagged Gabon's second on 58 minutes, the unmarked former Hull City forward's shot skimming past Diakite to hit the far post.
Mali coach Alain Giresse tried to shake things up after the hour, introducing striker Mustapha Yatabare for Abdou Traore, and shortly after Rohr surprisingly replaced captain Cousin with Fabrice Do Marcolino.
Mali were fighting for their Nations Cup existence and with six minutes left in regulation time Diabate levelled not long after entering the fray in place of Samba Sow, the Bordeaux striker turning to shrug off his markers in the box and leaving Ovono with little chance.
Rohr knows Diabete only too well, having signed him during his days as coach of Ajaccio.
The two sides were still deadlocked after extra time - Keita shot high in the last seconds - and Algerian referee Haimoudi Djameil pointed to the spot for the nerve jingling climax.
After Diakite had saved Aubameyang's kick it was left to Keita to step up and coolly slot home Mali's fifth to send the Eagles' spirits soaring while the Gabon team rushed to console a tearful Aubameyang.