Bata - Sudan consigned Burkina Faso to a 2-1 defeat here on Monday to qualify for the Africa Cup of Nations quarter-finals at the expense of Angola.
Mudather Eltaib scored either side of half-time to bag the precious points that lifted the Sudanese level with Angola, their rivals for the runner-up spot in Group B, and crucially with a better goal difference.
To add icing to the cake Sudan also celebrated winning their first Nations Cup match in over three decades.
The game was played out in a near-funereal atmosphere, with almost more players than fans at Bata's stadium, an embarrassment for organisers CAF and co-hosts Equatorial Guinea.
Sudan made one change, injured defender Bala Jaber replaced by Ahmed Khalefa.
For Burkina Faso the hapless Bakary Kone, who scored an own goal against Ivory Coast, punched a rival player and was instrumental in an Angola goal in the 2-2 draw, was dropped.
The Lyon defender was one of three switches, with Ibrahim Gnanou, Djakaridja Kone and Narcisse Yameogo getting their chance to shine for already eliminated Burkina Faso.
The game was only seconds old when Sudan coach Mohammed 'Mazda' Abdullah was forced to make another change, when Nagm Eldin had to be stretchered off after a collision in the Sudan box. Musab Omar came on in his place.
Sudan took a 33rd minute lead largely against the run of play when Mudather did well to keep going after Hamadou Tall's sliding tackle to shoot side-footed past the diving Daouda Diakite by the near post.
Sudan required all three points here and Angola to get nothing from the simultaneous match against Ivory Coast in Malabo to stand any chance of qualifying.
With the Ivorians having seconds earlier taken the lead it was game on for the side aiming to do better than their first round elimination in 2008 after a 32 year absence.
Sudan went off at the break level on points with Angola, but still needing to improve their goal difference to leapfrog the 2010 hosts and take the runners-up spot behind group winners Ivory Coast.
On 56 minutes, second half substitute Issiaka Ouedraogo had a decent chance to put Burkina Faso level but his shot went wide.
With news filtering through from Malabo that Ivory Coast had gone 2-0 up that meant Sudan and not Angola would progress if things stayed the same for the remaining 25 minutes.
Burkina Faso though were looking dangerous, and they had a goal disallowed shortly after for offside.
But Sudan wrapped up what by all accounts had appeared an unlikely place in the knockout stages in the 80th minute when Mudather ran onto a high ball, beat the keeper, and slotted in to an empty goal.
Ouedraogo's stoppage time contribution was too little too late to ruin Sudan's memorable night.
Mazda's men meet Zambia in the last eight in Bata on Saturday.
If they believe in omens they will remember that the last time they made it into the last eight, in 1970, they went on to win the title.