Ghana produced one of the most extraordinary finishes in the 45-year history of the African Nations Cup to join South Africa as the quarter-finalists from Group B.
Two goals in the final minute from Ghana substitute Isaac Boakye saw the Black Stars steal an amazing 2-1 win over Burkina Faso, a thrillingly ironic finale to a group that had earlier been dubbed the 'Group of Boredom'.
World Cup qualifiers South Africa meanwhile, who had laboured to consecutive 0-0 draws in their opening games, suddenly found their feet in Segou to rout Morocco 3-1 and finish as group winners.
But while South Africa were romping to victory over the Moroccans, the story of the tournament was unfolding in Mopti, 650km from Mali's capital.
Ghana had appeared to be down and out after Burkina Faso went 1-0 up in the 81st minute thanks to a superb curling freekick from Amadou Toure.
That scoreline - coupled with Morocco's defeat to South Africa - would have seen minnows Burkina Faso scrape into the last eight on goal difference.
However the picture was to change in lightning-quick speed in the final minute at Mopti's newly constructed Barema Bocouma Stadium.
On 89 minutes Boakye scrambled in his equaliser to leave Burkina Faso shattered, knowing that a 1-1 final score would put Morocco into the quarter-finals ahead of the Stallions.
But Ghana were to have the last word. The ball was swept upfield and Boakye was in the right place at the right time to smash an improbable winner past Burkina keeper Mohamed Kabore.
Ghana now advance as Group B runners-up to play Nigeria in the last eight, while South Africa play Mali in Sunday's other quarter-final.