DOHA: It looked like business as usual for Spain in their final World Cup Group E game against Japan as they dominated possession, notched an early goal and looked set to advance as group winners despite making five changes to their side.
By the end, however, their credentials as one of the favourites in Qatar had been stretched to the limit by Japan's remarkable 2-1 win and they were fortunate to join the Samurai Blue in the last 16 by virtue of a superior goal difference to Germany.
Spain put on a first-half possession clinic reminiscent of their dominant sides that conquered Europe and the world, with Alvaro Morata heading his third goal of the tournament after 11 minutes.
At that stage, Spain had enough probing possession to have pushed Japan back into a passive and jittery back five and they cruised through to halftime despite the lack of further clear-cut chances.
Both Rodri (115) and Pau Torres (109) completed more passes in the first half than Japan did as an entire team (89). The one-goal margin appeared to be sufficient against a Japan side playing with no real sense of urgency despite their place at the tournament being on the line.
Spain were not as solid defensively, however, and that weakness was exposed during an incredible six-minute spell after the restart when substitutes Ritsu Doan and Kaoru Mitoma made an immediate impact to flip the match and Group E on their heads.
Japan's high-pressing style which undid Germany had briefly unsettled Spain on a few occasions in the first half.
But they only took the game to their European opponents after coach Hajime Moriyasu's halftime substitutions and refused to let them settle on the ball.
Spain's tendency to give up possession as they built from the back had almost cost them against Germany and that trend continued against Japan, with Sergio Busquets losing the ball on the edge of the area and Unai Simon having to scramble a clearance off his own line on the half-hour mark.
Doan kicked off Japan's comeback by collecting another loose forward pass from Simon before unleashing a thunderous shot, while lively winger Mitoma made the other decisive but controversial contribution by cutting the ball back for Ao Tanaka to bundle the ball home.
Luis Enrique's side still saw most of the ball but were careless under pressure when faced with the possibility of elimination - which briefly became reality during Costa Rica's short-lived lead over Germany in the other Group E decider.
The Samurai Blue pulled off the victory with only 17.7% possession - the lowest for a winning team in recorded World Cup history - against a shell-shocked Spain side.
The 2010 world champions had virtually the entire second half to stage a comeback but lacked energy and ideas and barely threatened Shuichi Gonda in Japan's goal.
Spain, who demolished Costa Rica 7-0 in their opening group match and drew 1-1 with Germany, will be relieved to have stayed in the tournament, but they must now regroup before taking on surprise packages Morocco for a place in the quarter-finals.