RIO DE JANEIRO — Host Brazil will open its bid for a first Olympic men's football title against South Africa after Thursday's draw was made in the Maracana Stadium.
Brazil, three-time runner-up including in 2012, has won every title apart from the Olympics and is drawn in the same Group A as South Africa, Iraq and Denmark.
"I'm very confident, I'm sure that Brazil will succeed in the Games," said veteran Ronaldinho, winner of bronze in Beijing 2008, who attended the draw ceremony.
Holder Mexico is in Group C along with Germany, South Korea and Fiji while Group D includes Honduras, Algeria, Portugal and Argentina. European under-21 champion Sweden has been drawn alongside Colombia, Nigeria and Japan.
Contrary to the women's competition the men's teams are made up of Under-23 players with three players over that age allowed.
Clubs however are not obliged to release their players for the competition which does not appear on FIFA's official calendar although the world body organizes the event.
Three-time defending women's champion the United States was drawn against France in the first round.
The reigning world champion is in Group G along with third-ranked France, New Zealand and Colombia.
Top ranked United States has won three of the four titles since the women's tournament was first introduced at the 1996 Atlanta Games.
Germany, ranked No. 2 in the world by FIFA and three-time silver medalist, was drawn in Group F alongside Canada, Australia and Zimbabwe.
Brazil's women's team begin their campaign against China at the Estadio Olimpico in Rio de Janeiro on Aug. 3, while the men kick off against South Africa at the Estadio Mane Garrincha in Brasilia the following day.
The top two teams in each group qualify for the knockout stage, with the top two third-placed teams also progressing.
Men's draw
Group A: Brazil, South Africa, Iraq, Denmark
Group B: Sweden, Colombia, Nigeria, Japan
Group C: Fiji, South Korea, Mexico, Germany
Group D: Honduras, Algeria, Portugal, Argentina
Women's draw
Group E: Brazil, China, Sweden, South Africa
Group F: Canada, Australia, Zimbabwe, Germany
Group G: United States, France, New Zealand, Colombia.