Group E was open as all four teams -- Germany, Spain, Japan and Costa Rica -- were in the qualifying contention, and there was no time to breathe easy as the equations changed through Thursday night.
Here's how the equations went through a roller-coaster ride:
10 minutes: Germany (1 point) needed a win against Costa Rica (3 points). Serge Gnabry gives the Europeans the ideal start.
LIVE EQUATION: Spain, Germany, Japan on 4 points. Spain have a huge goal difference.
11 minutes Alvaro Morata scores for Spain
LIVE EQUATION: Spain 7, Germany second on 4. Japan, Costa Rica 3
48 minutesJapan equalise through Ritsu Doan, who supplied the leveller against Germany eight days ago.\
LIVE EQUATION: Spain still top on 5, Japan return to 2nd place on 4 (ahead of Germany on the teams’ head-to-head record, with the sides locked on four points, and identical goal difference and goals scored)
51 minutes Japan lead. Hajime Moriyasu’s team score their second goal in three minutes against Spain.
LIVE EQUATION: Japan now top. Spain and Germany on 4 with the 2010 champions ahead on goal difference.
58 minutes Costa Rica draw level against Germany through Yeltsin Tejeda’s strike.
LIVE EQUATION: Japan top, Costa Rica behind Spain on goal difference on 4. Germany 2 points.
70 minutes Costa Rica lead as Germany’s talisman goalkeeper Manuel Neuer scores an own goal.
LIVE EQUATION: Can you believe it? Japan and Costa Rica on 6 points, the Asian team ahead on goal difference. Spain (4), Germany (1) are out.
73 :minutes Germany equalise through Kai Havertz.
LIVE EQUATION: Japan 6, Spain are back, after being on the brink of a shock exit for 3 minutes. Spain, Costa Rica (4); Germany 2.
85 minutes Germany grab the lead again as Havertz scores his second.
LIVE EQUATION: Germany back on 4 points, level with Spain but of course, the 2010 champs are ahead on goal-difference. Costa Rica 3. Japan rules on 6.
89 :minutes Germany score their fourth goal. Niclas Fuellkrug scores his second goal of the tournament.
LIVE EQUATION: Germany desperately need a Spain equaliser against Japan as the song remains the same.
90+8 minutes Japan go crazy after the full-time whistle is blown. They win 2-1. They beat both Spain and Germany on the way to the top of Group E.
LIVE EQUATION: Japan 6, Spain (4; goal difference +6), Germany (4; goal difference +1), Costa Rica (3).
90+11 minutes Germany win 4-2 against Costa Rica. Too little, too late.
FINALLY: It’s Spain vs Morocco in the Last 16 on Tuesday. Japan face Croatia on Monday. Hansi Flick’s Germany out of group stage for the second World Cup in a row.