Japan staged their second stunning turnaround of the World Cup to beat 2010 champions Spain 2-1 on Thursday to surge into the last 16 along with their beaten opponents and dump Germany out in one of the greatest nights for the Samurai Blue.
Staring at the prospect of an early World Cup exit at half-time, Japan set up a round of 16 clash with Croatia - the beaten finalists in 2018 - while Spain had to rely on goal difference to edge out Germany. They now face Morocco.
Japan's turnaround was built on coach Hajime Moriyasu's revamp of his side at the break when they were losing 1-0.
On came Ritsu Doan and within three minutes he hammered in a shot from the edge of the box which Spain goalkeeper Unai Simon - whose poor clearance had created the danger in the first place - could not keep out.
With Japan's noisy travelling fans barely catching their breath, Ao Tanaka scored from point-blank range in the 51st minute, bundling the ball in after the other halftime sub Kaoru Mitoma cut the ball back from the byline.
The VAR system took several minutes to confirm the ball had not gone out before Mitoma's touch. Replays suggested that a sliver of the ball had not crossed the line and the verdict sparked wild celebrations similar to the scenes that followed Japan's 2-1 comeback win over Germany last week.
But plenty of images from the match suggest that the entire ball had gone over the touchline, hence triggering a controversy.
Even though the ball might have been placed on ground beyond the touchline, it's tangent was inside the permissible limit. Hence, a part of the ball was in-line with the touchline, prompting the officials to call it a legitimate goal.
According to the International Football Association Board (IFAB), the ball is out when "it has wholly passed over the goal line or touchline on the ground or in the air".
FIFA claimed that the "curvature of the ball" remained in, hence the ball was not out of play at that moment.
Spain coach Luis Enrique, who made five changes to his starting side to give first-choice players a rest, was far from happy.
"We didn't have any danger in the first half, then in the second half, I told them during halftime to be cautious, because they would attack in the second half, they don't have anything to lose," he said. "I have nothing to celebrate."