Minnows Mauritania, coached by Frenchman Patrice Neveu, reached the finals of the 2014 African Nations Championship (CHAN) with a shock win over Senegal.
They defeated Senegal 2-0 on Saturday in Nouakchott to win 2-1 on aggregate.
The other qualifier from the West 'A' region will be decided on 28 July, Mali lead Guinea 3-1 from the first leg.
Ghana, Libya, Morocco and hosts South Africa have already qualified for the finals of the tournament.
Trailing 1-0 from the first leg in Dakar, the Mauritanians drew level on aggregate in first-half stoppage time through Moulaye 'Bessam' Ahmed.
And 20,000 spectators at the national stadium in Nouakchott were celebrating again just past the hour mark when Taghyoullah Denne scored.
The crowd included President Mohamed Ould Abdel Aziz and numerous cabinet members.
Keen football fan Abdel Aziz reacted angrily several years ago when the national team propped up the Fifa Africa rankings.
Football officials responded by hiring experienced Frenchman Patrice Neveu, who coached Niger, Guinea and the DR Congo.
Mauritania defeated Liberia 2-1 at home and 1-0 away in a preliminary tie before tackling Senegal, who qualified for the first two editions of the CHAN.
South Africa hosts the 16-team tournament for home-based stars between January 11 and February 1 in Bloemfontein, Cape Town and Polokwane.