South Africa were lucky and Ghana unlucky when the 2011 All-Africa Games football tournament mini-league draw was made in Cairo on Tuesday.
South Africa are in Group A with hosts Mozambique, surprise inclusions Libya and Madagascar.
Ghana are in Group B with defending champions Cameroon, Uganda and Senegal.
Only Mozambique and Cameroon were seeded for the draw conducted by Confederation of African Football general secretary Hicham el-Amrani.
This heightened the risk of a lob-sided draw and that is what happened with Group B looking much stronger than Group A.
South Africa ousted Angola, Malawi and Zimbabwe to reach a second consecutive All-Africa Games after sneaking into qualifiers they forgot to enter thanks to the withdrawal of cash-strapped Namibia.
None of the other Group A contenders kicked a ball with Mozambique automatic qualifiers as hosts and Libya and Madagascar receiving walkovers when Egypt and Seychelles withdrew.
Former champions Egypt pulled out on the eve of the draw after receiving a walkover when Libya withdrew because of an ongoing armed rebellion against Colonel Gaddafi.
Cameroon have won four of the last five All-Africa Games football titles in a tournament restricted to under-23 footballers.
Mozambique, South Africa, Cameroon and Ghana appear favourites to occupy the top two places in the groups after the round-robin action and reach the semi-finals of a major attraction at the multi-sport African 'Olympics'.
The All Africa Games will be held from 3-18 tournament in Mozambique capital, Maputo.