The eight teams who will contest Africa's final qualifying round for the 2012 Olympic Games have been decided.
Morocco, Algeria and Egypt booked their places in December's mini-tournament over the weekend.
Senegal, Ivory Coast and Nigeria have earned their spots, alongside South Africa and Gabon.
Three countries will automatically qualify from Africa, with a fourth facing a play-off against an Asian side.
Morocco produced the most drama as Abderrazak Hamdallah netted late on to earn a 1-1 draw in DR Congo.
The visitors had been going out but the goal made them 3-2 aggregate winners.
With just three minutes left in Kinshasa, Hamdallah chased after a lobbed pass, chested down the bouncing ball before showing fine pace and control to fire his shot across the diving goalkeeper.
The stunned home team never recovered and Morocco advanced, largely thanks to Hamdallah who had snatched a stoppage-time winner in the first leg two weeks ago.
Deo Kanda had put the Congolese ahead on 57 minutes against the Atlas Cubs, who are guided by Pim Verbeek - the Dutchman who coached Australia at last year's World Cup.
Elsewhere, Zambia scored early and late goals to defeat 10-man Algeria 2-0 in Chingola but fell just short overall after trailing by three goals from the first encounter.
Venacious Mapande and Derick Mwansa scored for the Baby Copper Bullets while the North Africans endured an anxious closing 10 minutes after having a player red carded.
The elimination of Zambia left the hopes of the region resting on South Africa, who overcame a 3-1 deficit against surprise package Benin in Johannesburg when winning 5-1.
A nightmare match for Benin goalkeeper Wassiou Salami helped South Africa qualify as 6-4 aggregate winners, although the home nerves were only settled by a late strike that gave them a two-goal cushion.
Salami was replaced by Benin coach Moise Ekoue at half-time but the damage had already been done with the home team scoring four unanswered goals.
Fadel Suanon pulled one back after 79 minutes - and a second Benin goal would have taken them through on away goals - but South Africa's Bongani Ndulula scored his second of the match three minutes from time to seal success.
In Alexandria, Egypt outplayed Sudan, shock conquerors of Ghana in the previous round, but the 2-0 win did not reflect the superiority of the home team who fought out a goalless first leg.
Egypt took the lead on 58 minutes when Sudanese goalkeeper Mounir al-Khair failed to grasp a long-range shot and Ahmed Sherweda reacted quickest to poke the ball over the goalline.
Ahmed Hamoudi set up the second goal for fellow substitute Shehab Ahmed to head home 10 minutes later and the woodwork prevented Sherweda scoring again as the visitors faded.
Abdoulaye Sane scored to give Senegal a 1-0 win over Tunisia, with the hosts qualifying in Dakar through the same aggregate score.
The goal-shy Senegalese have found the net just twice in four qualifiers against Angola and Tunisia, but have conceded just once as they seek to match the rising fortunes of the senior national team.
Ivory Coast completed a 'double' over Congo Brazzaville with a 1-0 victory in Abidjan courtesy of a 10th-minute goal from Jean-Jacques Gougouhi and progressed 3-1 on aggregate.
Elsewhere, Nigeria also qualified as 3-1 aggregate winners after beating Tanzania 3-0 in Benin City on Sunday, in a match delayed by 24 hours because of rain.
Ekigho Ehiosun showed his importance to the team as he opened the scoring after missing the first leg because of Super Eagles duty, before Ganiyu Oseni and Ahmed Musa wrapped up the win.
Gabon needed extra-time to get past Mali but with six minutes remaining in Bamako Didier N'Dong broke the deadlock to send the 2012 Africa Cup of Nations co-hosts into the next stage, 1-0 on aggregate.
The eight teams who make it through will play in a final tournament, with two groups of four teams, in a country of one of the qualified teams in December.