How football works at the Olympics
Football at the Olympics loosely follows the format used at World Cup with nations playing round-robin matches within their pools in an attempt to qualify for the knockout phase.
Qualification is based on regional qualifying with the men's tournament restricted to 16 teams and 12 teams in the women's competition.
Squads are limited in size to 18 players and in the women's competition there is no age restriction, but men's teams are only allowed to include three players aged over 23 in their squads.
Men: (matches start July 26)
Group A: Great Britain, Senegal, UAE, Uruguay
Group B: Mexico, South Korea, Gabon, Switzerland
Group C: Brazil, Egypt, Belarus, New Zealand
Group D: Spain, Japan, Honduras, Morocco
Four groups of four nations with the pool winner and runner-up qualifying for the quarter-final stage.
Pool winners play the second-placed team in other pools for a place in the semi-finals.
Losing semi-finalists play-off for the bronze medal while the winners contest the gold medal match.
Women: (matches start July 25)
Group E: Great Britain, New Zealand, Cameroon, Brazil
Group F: Japan, Canada, Sweden, South Africa
Group G: United States, France, Colombia, North Korea
Three groups of four nations. The pool winners, runner-ups and the two best third-ranked teams advance to the quarter-final stage.
Pool winners play either a pool runner-up or one of the best-ranked third place teams. The other quarter-final is between two pool runners-up.