Star-studded Brazil survived a second-half fightback by Egypt to win its men's Olympic football opener 3-2 in Cardiff.
Brazil is one of the few teams with many of its top players in the Olympic tournament and has been touted as one of the main gold medal favourites.
Egypt meanwhile entered the competition trying to restore some of its football pride nearly six months after a stadium riot that killed more than 70 people and forced the suspension of the national league.
Rafael opened the scoring in the 16th minute, Leandro Damiao added another in the 26th and Neymar scored in the 30th to give Brazil a comfortable half-time lead before Egypt made it interesting with goals by captain Mohamed Aboutrika in the 52nd and substitute Mohamed Salah in the 76th.
Brazil was able to control the rest of the game and held on for the victory, staying on track for its first gold in Olympic football.
The Olympic tournament is the only significant football competition Brazil has never won with the country's senior side five-time world champion. Brazil finished with Olympic silver in 1984 and 1988 and the bronze in 1996 and 2008.
In other matches Senegal spoiled Great Britain's long-awaited return to Olympic football, snatching a late equaliser to earn a 1-1 draw in a bruising encounter at Old Trafford.
Moussa Konate's 82nd-minute leveller prevented Britain from making a winning start to its first appearance in an Olympic football tournament for 52 years after Craig Bellamy had fired the host into the lead.
A blunder by goalkeeper Michael O'Keefe condemned New Zealand to a 1-0 defeat at the hands of Belarus.
Elsewhere Uruguay beat United Arab Emirates 2-1 and Gabon held Switzerland to a 1-1 draw.
Manchester City faces a possible reunion with former striker Mario Balotelli in Germany this northern summer.