Ghana and Algeria have gone through to the quarter-finals of the Africa Cup of Nations after wins over South Africa and Senegal respectively in their final Group C games tonight.
John Boye and Andre Ayew scored as Ghana came from behind to defeat South Africa 2-1 in Mongomo.
Both teams were facing elimination from the tournament following Mandla Masango's fantastic first-half strike, but Boye gave former Chelsea manager Avram Grant's side hope in the 73rd minute.
Ayew's header seven minutes from time ensured the four-time winners progressed as group winners, while Bafana Bafana finished bottom with just a solitary point.
"We deserve it, we showed great character and fighting spirit," said Grant afterwards.
Algeria, meanwhile, clinched a place in the last eight with a 2-0 win over Senegal in Malabo that eliminated their opponents.
A superb late strike from Tottenham midfielder Nabil Bentaleb wrapped up the victory after an early Riyad Mahrez goal set the Algerians on their way, leaving Senegal, who needed a draw to advance, heartbroken.
Algeria went into the final round of group matches lying in third place behind Senegal and Ghana, the victory meaning it’s the first time since 2004 that Algeria have reached the last eight of the competition.
Ghana will now play the Group D runners-up in Mongomo on Sunday, while Algeria face the Group D winners in Malabo, also on Sunday.