Jose Luis Gaya's injury-time equaliser cancelled out Timo Werner's opener and helped Spain snatch a last-gasp 1-1 draw with Germany in Group 4 of the UEFA Nations League.
On Thursday, Germany started brightly on home soil and created the first chance of the game as Toni Kroos' cross into the box allowed Thilo Kehrer to test Spain goalkeeper David de Gea in the 11th minute, reports Xinhua news agency.
Spain responded with a big chance at the other end of the pitch as a misplaced return pass from Emre Can to goalkeeper Kevin Trapp allowed Rodrigo Moreno to intercept the loose ball. However, Trapp denied Moreno after blocking the shot in the nick of time in the 14th minute.
Both sides continued to exchange attacks after Leroy Sane unleashed a hammer on target to force de Gea into action once again six minutes later.
Moreno remained in the thick of things and kept Germany's defense busy as the striker hit an effort on target from a promising position in the dying seconds of the first half.
After the restart, Germany got a perfect start as Werner broke the deadlock on 51 minutes after capitalising on Robin Gosens' square pass into the penalty area.
Germany took the reins and pressed forward whereas Spain looked shocked and unable to respond.
As the match progressed, Joachim Low's men retreated with their narrow lead and kept all their men behind the ball.
Meanwhile, Spain lacked in penetration and failed to pose danger in front of Germany's goal.
Luis Enrique's team left it late and flabbergasted the hosts when Moreno flicked on a cross before Gaya poked home with a turn shot from very close range in the closing seconds of injury-time.
"It is of course very painful if you concede a goal in the last seconds of the match but I have to say that my team gave everything. Both sides played an interesting first half with chances at both ends of the green. I am overall satisfied with the performance," said Germany head coach Joachim Low.
With the result, Spain and Germany share the spoils and second place in Group 4. The Spaniards clash with frontrunners Ukraine while Switzerland face Germany on Sunday.