The Black Meteors qualified ahead of Algeria when they stunned the North Africans after drawing at home to book a place in the finals to be staged in Egypt.
READ MORE: Video: Thomas Partey’s girlfriend in wild jubilation after Ghana’s midfielder scored at Olympiacos
Meanwhile, Nigeria, Zambia, Ivory Coat and South Africa were placed in the same group when the draw for the 2020 Tokyo Olympic Games qualifying tournament was made on Wednesday in Egyptian city Alexandria.
Teams are restricted to under-23 footballers and the finalists and the winners of the third-place play-off will represent Africa in Japan, where teams can use three 'over-age' players.
Nigeria have won gold (1996) and silver (2008) at Olympic football tournaments, Cameroon gold (2000) and Ghana bronze (1992).
The tournament doubles as the Africa U23 Cup of Nations and the previous two editions were won by Gabon (2011) in Morocco and Nigeria (2015) in Senegal.
Ghana last qualified for the Olympics football in 2004.
The tournament will be held from November 8-22.
Draw
Group A
Egypt (hosts), Mali, Cameroon, Ghana
Group B
Nigeria, Ivory Coast, South Africa, Zambia