Sudan registered a spot in the knockout stages of the Africa Cup of Nations for the first time in 42 years after a 2-1 win over Burkina Faso.
The victory saw Mohamed Abdalla's side progress from Group B at the expense of Angola, who were beaten 2-0 by Ivory Coast.
Entering the match three points in arrears of Angola and needing a goal difference swing of three, Sudan scored twice through Eltaib Mudather in either half to complete a remarkable turnaround.
The east Africans still managed a quarter-final berth despite a late strike from Issiaka Ouedraogo.
Their qualification was secured after group winners Ivory Coast eased past Angola, who only needed a draw to secure a passage into the next round.
With the likes of Didier Drogba, Yaya Toure and Gervinho watching on from the bench, the second-string Ivory Coast outfit took the lead in the 33th minute through Emmanuel Eboue.
Wilfried Bony tapped in a second 19 minutes after the interval to maintain his side's perfect record in the tournament and send Lito Vidigal's side crashing out.