Updated

Brazil needed only 30 minutes to show why it is one of the favorites in the men's Olympic soccer tournament.

It spent the final 45 minutes proving it has a lot of work to do to win gold.

Rafael, Leandro Damiao and Neymar scored in a 13-minute stretch of the opening half, and Brazil held on to defeat Egypt, 3-2, on Thursday on the first day of the tournament at Millennium Stadium.

Spain, another pre-tournament favorite, was upset its opener by Japan, 1-0, to turn Group D upside down. Host Great Britain also struggled, as it was held to a 1-1 draw by Senegal in Group A.

Brazil avoided the same fate in Group C - but it was not easy. Its collection of Under-23 talent, supplemented by three overage players, nearly collapsed in the second half.

Manchester United defender Rafael notched the opening goal in the 17th minute, Leandro Damiao doubled the lead in the 26th, and 20-year-old sensation Neymar capped the three-goal outburst off a header in the 30th.

Brazil had trouble closing out the match as Mohamed Aboutrika pulled the first goal back for Egypt in the 52nd, and Mohamed Salah cut the deficit to one goal in the 76th.

The Brazilians managed to hold on over the final 15 minutes and sit atop their group. Spain and Great Britain cannot say the same thing.

Japan pulled off the first big surprise of the tournament, as Yuki Otsu scored in a win over 10-man Spain at Hampden Park in Glasgow, Scotland, to secure the top spot in Group D.

"(Japan is) a good team as well and they played as a group and they deserved to win," Spain midfielder Juan Mata said. "We need to improve some things (in out next two matches) and we have to play better."

Great Britain was in control at Old Trafford in Manchester, England, as a goal from Craig Bellamy in the 20th minute stood for most of the match. Senegal did not give in, though, and grabbed the equalizer 8 minutes from time.

Moussa Konate ran onto a perfect pass in the area, then chipped Great Britain goalkeeper Jack Butland to the near post in the 82nd minute.

Great Britain, which earlier saw defender Danny Rose clear a sure goal off the line, just missed all three points when Marvin Sordell hit the crossbar in the 88th.

In Group B, Giovani dos Santos and Raul Jimenez missed late chances and Mexico tied South Korea, 0-0, at St James' Park in Newcastle, England.

"We're pretty happy with the draw. Even until the end we were attacking and trying hard to score," Mexico coach Luis Fernando Tena said. "Unfortunately the match did not end as we would have liked."

Also in Group A, Gaston Ramirez and Nicolas Lodeiro scored as Uruguay overcame an early deficit to edge United Arab Emirates, 2-1, at Old Trafford.

Also in Group B, Pierre Aubameyang scored just before halftime as Gabon earned a 1-1 tie against 10-man Switzerland at St James' Park.

Also in Group C, Dmitri Baga scored just before halftime as Belarus downed New Zealand, 1-0, at City of Coventry Stadium in Coventry, England.

Also in Group D, Jerry Bengtson scored twice in a 9-minute span of the second half as Honduras tied 10-man Morocco, 2-2, at Hampden Park.