Japan's men's football team landed the first major shock of the Olympic Games with a 1-0 win over Spain at Hampden Park that could and should have been an even heavier defeat.

Yuki Otsu's 34th-minute goal was enough for a deserved victory against 10-man Spain, who were spared a thrashing by fine goalkeeping from David De Gea and poor finishing from the Asian side.

Japan repeatedly cut the European U21 champions to shreds following Inigo Martinez's dismissal four minutes before half-time.

Martinez was shown a straight red card for a professional foul - had the referee played advantage, Japan would have been 2-0 up as they netted seconds later.

Spain boasted the likes of Juan Mata, Jordi Alba and Javi Martinez in their starting XI, all of whom featured in their senior side's Euro 2012 victory, but they were comprehensively outplayed by quick-breaking Japan. De Gea was arguably the man-of-the-match.

Luis Milla's team applied some late pressure but left gaping holes at the back, which Japan failed to exploit despite creating countless clear-cut opportunities, Kensuke Nagai particularly wasteful although he had an otherwise fine game up front.

The final whistle was greeted by wild celebrations from Takashi Sekizuka's side, with some of his players reduced to tears by the result.

The victory puts Japan top of Group D after Honduras drew 2-2 with Morocco.

In Group C, Brazil almost threw away a three-goal lead against Egypt but held on to win 3-2. Rafael, Leandro Damiao and Neymar were on target for the pre-tournament favourites, with Mohamed Abu Trika and Mohamed Salah pulling goals back for the Pharaohs.

In Group A, Uruguay came from behind to beat UAE 2-1.

In Group B, Mexico and South Korea ground out a tepid goalless draw while Gabon held Switzerland to a 1-1 draw in Newcastle.