Africa Cup of Nations 2012 qualifying all down to maths
The teams who will fill the 10 remaining places in the finals of the 2012 Africa Cup of Nations in Equatorial Guinea and Gabon are being determined this weekend.
Senegal, Ivory Coast, Botswana and - subject to a legal case - Burkina Faso were already through before the weekend's dramatic climax, alongside the co-hosts.
Mali, Guinea, Zambia, Libya, Niger, Ghana, Angola, and Tunisia all added their names to the list of qualifiers on Saturday, but whilst crucial, tense matches have been taking place all over the continent, fans have needed to keep their calculators handy.
The BBC's Steve Vickers has been looking at the permutations so far, and what it means for your team.
It took some very testing mathematics to prove that Niger had qualified for the Africa Cup of Nations finals for the first time, and they have the head-to-head rule to thank for it.
Indeed, South Africa initially believed that they had finished top of Group G after their 0-0 draw with Sierra Leone, with Niger having lost 3-0 to Egypt.
South Africa, Niger and Sierra Leone all ended the campaign with nine points, and if goal difference had been the first criterion for separating the teams then Bafana Bafana would indeed have won the group, and Niger would have only finished third.
But the tournament rules state that where two or more teams finish level on points, the standings will be decided on results between the teams concerned.
So a mini-league was drawn up with results from the games between South Africa, Niger and Sierra Leone, and excluding results from games played against bottom-placed Egypt.
Since Niger had home wins against South Africa and Sierra Leone they accumulated six points.
South Africa and Sierra Leone both had one win and two draws, giving them five points each.
So Niger were clear winners in this three-team mini-league, and they will be great fans of the head-to-head rule!
Meanwhile, Libya were able to celebrate qualification by the end of Saturday as they had guaranteed themselves one of the two spots reserved for the best runners-up, with a goalless draw away to Zambia.
The places for the two best runners-up are determined by a rather complex method.
Since Group F has only three teams, to level the playing field, in the groups that have four teams, the results between the second-placed sides and the bottom teams are erased.
Goals scored and conceded against the bottom-placed team are also erased.
Libya were leaders in this race after Saturday's games, with a recalculated total of eight points.
Sudan and Cape Verde both have seven points, with the better goal difference belonging to Sudan.
The final two runners-up will be known on Sunday, and in Group H the highest possible recalculated total would be six points for Benin.
This means that Libya are certain to finish in the top two, and Sudan are likely to qualify also.
But there is a slim chance that Morocco could deny Sudan, if Morocco finish second in Group D and Algeria finish bottom, so the nail-biting climax to the 2012 qualifiers will continue until the very end.