Germany earned a spirit-boosting draw against Spain thanks to Niclas Füllkrug's late equaliser.
Germany were looking to bounce back from their shocking 1-2 opening World Cup defeat, but were faced with a hard task against a Spain side that thrashed Costa Rica 7-0 in their first match in Qatar.
Fortunately for Germany, Costa Rica beat Japan 1-0 earlier today, meaning that Hansi Flick's would have options to advance to the knockout stages regardless of tonight's result.
The result means that a win over Costa Rica will be enough to send Germany through if Spain beat Japan. In the event of a draw between Spain and Japan, Germany need to ensure that they have a better goal difference than the latter.
Hansi Flick made two changes from the side that lost to Japan, with Thilo Kehrer and Leon Goretzka coming into the starting line-up at the expense of Nico Schlotterbeck and Kai Havertz, while Dani Carvajal replaced Cesar Azipilicueta for Spain.
Coming into the game with plenty of confidence, Spain took the initiative and came close to an early goal, when Dani Olmo's threatening strike was palmed onto the woodwork by Manuel Neuer.
Jordi Alba and Ferran Torres also threatened for Spain in the first half, but it was Germany who had the ball in the net first, when Antonio Rüdiger headed in from a set piece with 40 minutes played. However, the goal was ruled out after a VAR review, which showed that the centre-back was in an offside position.
Germany created the first real opportunity of the second half, when Joshua Kimmich's effort was saved by Unai Simon in the 56th minute, but fell behind just past the hour mark. Jordi Alba swung in a cross that was met by second-half substitute Alvaro Morata, who directed the ball past Manuel Neuer to give Spain the lead.
Hansi Flick reacted by sending Lukas Klostermann, Leroy Sané and Niclas Füllkrug onto the pitch. After creating a couple of promising opportunities – including a glorious chance for Musiala – Germany were finally rewarded with a goal 83 minutes into the game. Musiala took the ball past the Spain defence, and it ended at the feet of Füllkrug, who hammered the ball past Unai Simon.
Germany nearly stole the win in injury time, when Leroy Sané raced clear on the left and attempted to take ball past Unai Simon, but his touch was too heavy and the move broke down after he tried to cut back.