Brazil could face a semi-final clash with Germany in a repeat of their memorable meeting at the FIFA World Cup in 2014 following the draw for the men’s Olympic football tournament here this morning.
The host nation avoided a potential tie with the world champions in the group stage, however, instead being pitted against South Africa, Iraq and Denmark in Group A.
In an eagerly anticipated ceremony attended by a huge media contingent, as well as leading officials from Rio 2016, and coaches from all the participating teams, Brazilian football legend Ronaldinho was among those drawing the groups.
Brazil, one of four top seeds, were guaranteed to avoid defending champions Mexico, as well as Japan and bitter rivals Argentina in the group stage.
Germany, seeded in the fourth pool of teams due to their poor record in the past five Olympic tournaments, lurked ominously, two years after their 7-1 World Cup victory over Brazil.
Because no teams from the same Confederation could be drawn against each other, there was a 50 per cent chance of the dream tie taking place by the time the final pot of teams was drawn.
This was avoided, however, as Denmark was instead pulled out, leaving Ronaldinho smiling with relief.
Germany were drawn in Group C along with Mexico, South Korea and Fiji.
Brazil will face South Africa in their opening match at Brasilia’s Mane Garrincha Stadium on August 4 after Iraq face Denmark in the same venue earlier in the day.
That is a day before the official Opening Ceremony of the Olympics is due to take place here.
Sweden, winners of the UEFA qualifying competition, will play in Group B along with Colombia, Atlanta 1996 winners Nigeria and Japan.
Athens 2004 and Beijing 2008 champions Argentina will play in Group D along with Honduras, Algeria and Portugal.
If both Brazil and Germany win their groups and the quarter-finals ties, they could still meet in a semi-final tie here on August 17.
The winner could, like in the World Cup, face Argentina in the final.
All teams consist of under-23 players, with each squad permitted three over-aged members.
Barcelona star Neymar has already been granted permission to lead the Brazilian squad.
Other major stars who could potentially play include Portugal’s Cristiano Ronaldo, Sweden’s Zlatan Ibrahimovic, Colombia’s James Rodriguez and Algeria’s Riyad Mahrez.
Argentina’s Lionel Messi has already announced that he will not participate in order to focus on June’s Copa America.
Brazil were drawn against China, Sweden and South Africa in Group E of the women’s competition which was drawn before the men’s event.
Their clash with the Chinese here on August 3 will be the first sporting action of the entire Olympic Games.
Canada, Australia and debutantes Zimbabwe will join Germany in Group F.
Defending champions United States will lock horns with New Zealand, France and Colombia in Group G in the 12-team tournament in which players of any age can participate.
Ronaldinho, an Olympic bronze medallist at Beijing 2008, was joined by centre-half Aline Pellegrino, who skippered the Brazilian women’s team to silver at Athens 2004.
They were joined by two-time Olympic basketball medalist Janeth Arcain and Beijing 2008 long jump champion Maurren Maggi.
The only salutary note was the complete lack of working WiFi until well after the ceremony had finished, something that must be sorted ahead of the Olympics.