Germany is on the brink of elimination.
Alvaro Morata, who came off the bench in the 54th minute, opened the scoring in the 62nd minute for Spain with a silky outside-the-boot finish past Manuel Neuer.
Jordi Alba, Spain’s left back, delivered the low cross past Thilo Kehrer as Morata cut in front of Niklas Sule to get the angle.
Get Boston local news, weather forecasts, lifestyle and entertainment stories to your inbox. Sign up for NBC Boston’s newsletters.
It marks Morata’s second goal of the 2022 World Cup in Qatar after getting on the score sheet in Spain’s 7-0 rout of Costa Rica in its Group E opener.
If the result holds, Germany will need Japan to lose to Spain on Thursday and it will need to beat Costa Rica in order for goal differential to come into play.