World and European champions Spain fell to a surprise defeat in their opening match of the Olympic Games as Japan pulled off the first shock of the Olympic football competition by beating 10-man Spanish team 1-0 at Hampden Park.
Spain were second favourites for gold having won the last three major tournaments, as well as last year's European Under-21 Championship.
But Yuki Otsu's 34th-minute strike was enough for Japan's first win over Spain at any level after Inigo Martinez was sent off in the 41st minute.
In truth the margin of victory could have been much greater as 10-man Spain struggled with the pace and pressure enforced by their opponents.
The 1992 Olympic champions were already 1-0 down when they had Inigo Martinez sent-off with five minutes remaining in the first half and failed to recover from their numerical disadvantage.
Keigo Higashi, Kensuke Nagai and Hiroshi Kiyotake all went close for Japan after the break but the one goal was enough to send the Asians top of Group D after Honduras and Morocco's 2-2 draw earlier in the day.
Spain started by trying to impose their usual possession-based dominance on the game but they were hustled from the very first whistle by an energetic Japanese outfit.
Chelsea's Juan Mata forced Shuichi Gonda into a fine save with Spain's only serious effort of the first half but it was Japan who were threatening more regularly and they were rewarded after 33 minutes when Otsu outmuscled Martin Montoya to prod home Takahiro Ohgihara's corner.
Kiyotake should then have doubled the lead as he pounced on a wayward backpass from Alvaro Dominguez but after rounding Manchester United keeper David De Gea he just could not turn his shot on target from a narrow angle.
Spain now go into Sunday's match with Honduras bottom of the group, despite starting with Euro 2012 winners Jordi Alba, Javi Martinez and Chelsea midfielder Juan Mata.
Earlier in Glasgow, Honduras drew 2-2 with Morocco in the other Group D game.
Abdelaziz Barrada had earlier given Morocco a 39th-minute lead with a superb volley, before Jerry Bengtson's tap-in gave Honduras a 56th-minute equaliser.
Bengtson put Honduras in front with a 65th-minute penalty but Zakaria Labyad levelled two minutes later and Morocco held on for a point after Zakarya Bergdich was sent off for kicking out at Mario Martinez with 18 minutes left.