Japan put a dent in Spain's quest to become the fourth World Cup holder to win an Olympic Games gold medal, with a shock 1-0 win in Group D.
The Blue Samurai has never beaten Spain in men's competition, but Yuki Otsu's first half strike was enough to consign a star-studded Spain to bottom place in the group.
Otsu broke away from his marker during a corner in the 34th minute and the ball landed at his feet for a simple tap-in past Spain's Manchester United goalkeeper David de Gea.
Spain's under-23 side, the bulk of which won the 2011 FIFA U-21 World Cup, is chasing Olympic Games gold to add to the World Cup and European Championship titles held by the country's senior men's national team.
But Japan's J.League-based striker Kensuke Nagai caused major problems for Spain, slipping behind its defence with quick runs.
Spain central defender Inigo Martinez was sent off for his tackle on Nagai as he tried to prevent the Japanese marksman from scoring.
In the other Group D match, former Australia coach Pim Verbeek watched his highly-fancied Morocco side squander a lead to finish 2-2 with Honduras.
The draw consigns Spain to last in the group.