Japan finished as the winners of Group E of the World Cup, while Spain reached the round of 16 on goal difference.
Japan scored twice at the start of the second half to take the lead beat Spain 2-1 and advanced to the round of 16 of the World Cup.
Alvaro Morata scored Spain’s first goal in the 11th minute at Khalifa International Stadium on Thursday, but Japan bounced back after halftime.
Ritsu Doan equalized in the 48th minute with a left-footed shot from outside the box minutes after coming on as a halftime substitute, and Ao Tanaka added a second from close range a few minutes later.
It took about two minutes for officials to review the video to confirm the ball did not go out of bounds in front of goal.
Japan top Group E, while Spain are second on goal difference – leaving Germany out, despite a 4-2 win over Costa Rica on Thursday.
Japan also shocked Germany 2-1 in their opening Group E match at the same venue.
Than to follow.