Pre-tournament favourites Spain embarrassingly bowed out of the men's Olympic football competition without a goal to their name.
A month ago their compatriots retained their European Championship crown to add to World Cup glory, but this has been a few days to forget for coach Luis Milla's side.
The goalless draw with Morocco, in front of a crowd of 35,973 at Manchester United's Old Trafford, also ended the faint hopes of the north Africans, leaving Japan and Honduras as the surprise qualifiers from Group D.
The opening 45 minutes was an even affair, albeit devoid of many notable chances and punctuated towards the end by a torrential downpour.
Morocco's Abdelaziz Barrada fired through the six-yard box from close range in the 27th minute when it appeared easier to hit the target.
That was followed four minutes later by Spain's best opportunity when Chelsea's Juan Mata played in Adrian Lopez inside the area, only for the Atletico Madrid striker to hit the post.
On the hour, Morocco should have taken the lead, but Barrada's low shot when clean through struck the inside of advancing Manchester United goalkeeper David de Gea's right knee.
Then Spain had four chances in seven minutes, but a Mata drive wide and a volley over from six yards sandwiched Lopez laughingly scuffing a one-on-one effort, whilst Chelsea midfielder Oriol Romeu saw Abdelatif Noussir clear his header off the line.
Late on, Spain nearly had salt rubbed into their wounds, however Zakaria Labyad blazed a volley over from point-blank range.