South Africa shocked Egypt 3-1 in Ismailia on Sunday to reach the final qualifying round for the African Nations Championship.
The visitors advanced 4-2 on aggregate after a 1-1 first-leg draw in Bloemfontein last weekend. They will face Malawi home and away during May for a place at the biennial tournament.
Originally slated for February, the 19-nation championship in Kenya, Tanzania and Uganda has been put back to August after preparations fell behind schedule.
Having drawn in South Africa, Egypt were favoured to advance. However, they could not match their livewire opponents in the opening and were lucky to only trail 2-1 at half-time.
Outstanding South Africa captain and midfielder Neo Maema opened the scoring on 15 minutes. He could have had a hat-trick before the break having struck the woodwork before and after his goal.
Yandisa Mfolozi doubled the lead on 27 minutes after the home side failed to clear a cross. Egypt halved the deficit five minutes later through Abou el Enein.
South Africa regained their two-goal advantage on the night, and on aggregate, six minutes into the second half when Siphelele Luthuli converted a penalty.
Stunned Egypt needed at least three goals, under the away-goal rule, to win the first-round tie, but never looked like achieving that.
Elsewhere, Malawi completed a double over the Comoros by winning 2-0 on Saturday in Lilongwe. They also won the first leg by two goals to qualify 4-0 on aggregate.
Wongani Lungu put the home side ahead on 50 minutes and Binwell Katinji netted just before the hour mark in the capital of the central Africa country.
The Comorans ceded home advantage in the first leg as the south-east Africa island state does not have an international-standard stadium.
Gambia are another country lacking a FIFA-approved venue, but that did not prevent them eliminating Gabon and setting up a final-round showdown with Algeria, who had a bye.
After two 0-0 draws, the outcome was settled by a penalty shootout. Gambia converted their five spot kicks to win 5-3 in southeastern Gabonese city Franceville.
The CHAN is a unique international competition as it is restricted to footballers playing in their country of birth. Matches carry full international status and count toward world rankings.
Morocco and the Democratic Republic of Congo have been champions twice each, and Tunisia, Libya and Senegal once.
© Agence France-Presse
Photo:MB Media/Getty Images