Spain captain Sergio Ramos missed two penalties but team mate Gerard Moreno came off the bench to grab a late equaliser and snatch a 1-1 draw away to Switzerland in the Nations League on Saturday.
The result relegated Switzerland and Spain lose top spot in Group A4 to Germany, who earned a 3-1 win over Ukraine and lead the standings with nine points.
Spain are second with eight and must win Tuesday's showdown at home to Joachim Loew's side in order to progress to the final four.
Ramos, who also became the most capped European player of all time, had scored all of his previous 25 penalties but was thwarted when Yann Sommer guessed the right way and repelled his spot kick in the 58th minute to preserve Switzerland's lead.
The hosts had taken the lead in the 23rd minute through a brilliant strike on the half volley from Remo Frueler and could have doubled their advantage in the second half when Haris Seferovic rounded keeper Unai Simon, but Ramos came to his side's rescue and got back to clear the shot off the line.
Spain then earned a second penalty in the 79th which led to Swiss defender Nico Elvedi being sent off for a second booking.
However, Ramos was again outwitted by Sommer, who could not be fooled by the defender's chipped 'Panenka' penalty and caught the ball. It's the first time Spain have missed two penalties in one match.
Substitute Moreno saved Ramos' blushes in the 89th minute, lashing home a cross from Sergio Reguilon as Spain finally found a way past Sommer after firing 20 shots at goal to Switzerland's seven.
"Football is like this, it's a marvellous sport but sometimes it's very unfair," said Spain coach Luis Enrique.
"We were lacking a bit of freshness but I think we played well even though we couldn't do the most difficult thing, which is to score. We deserved to win for our first half performance and for how we played in the second."
France eclipse holders Portugal to reach Nations League final four
France handed defending Nations League champions Portugal a rare defeat on Saturday, winning 1-0 in Lisbon with N'Golo Kante's second-half strike to reach the competition's final four at the expense of the holders.
Anthony Martial missed three clear-cut first half chances for France before Kante scored only his second international goal in the 54th minute, and his first since 2016, to end Portugal's run of five successive clean sheets.
World champions France went top of Group A3 with 13 points from five games, three ahead of Portugal and with the better head-to-head record to give them an unassailable lead. It was only Portugal's second defeat since the 2018 World Cup.
"Given the quality of the opposition, it’s of course one of our best performances of recent times," France coach Didier Deschamps said of Portugal, who are the European champions.
"We deserved the win and we’ve fulfilled our objective of finishing top. I’m very proud of the players. They proved tonight that France are still a great team."
Antoine Griezmann set up Martial's first chance in the 12th minute with a slide-rule pass but Portugal's excellent goalkeeper Rui Patricio blocked it at point-blank range.
Martial then diverted Adrien Rabiot's acrobatic effort onto the bar with his head and saw another effort brilliantly saved at close range by Patricio from Lucas Hernandez's cross.
At the other end, Cristiano Ronaldo forced a diving save from France captain Hugo Lloris and also wasted a free kick which he drove straight into the wall.
France finally broke through just as Portugal appeared to be imposing themselves. Griezmann slipped another ball through to Rabiot whose shot was parried by Patricio and Kante was on hand to score from the rebound.
Portugal had three chances go begging in the same attack, including a Jose Fonte header against the post, and Lloris made a one-handed save to parry a raking drive from Joao Moutinho, who then saw his cross evade three forwards as France held out.
"I don't know what went wrong in the first half, it wasn't what I expected but it was my responsibility," said Portugal coach Fernando Santos.
"We were better in the second half but then conceded the goal which settled the game... we had three or four chances to equalise."
Germany beat Ukraine 3-1 with Werner double to top group
Germany striker Timo Werner scored in each half to help steer his side from behind to a 3-1 home win over Ukraine in the Nations League on Saturday as they topped the group with one round of games left to play.
Werner scored twice after Leroy Sane had cancelled out a surprise 12th minute lead for the visitors, who had four players, including top striker Andriy Yarmolenko, ruled out after testing positive for COVID-19 on the eve of the game.
The Germans, in the midst of an overhaul following their 2018 World Cup first round exit, are now top of Group A4 on nine points, one ahead of Spain who they visit on Tuesday. The top team qualify for the final four stage of the competition.
Ukraine, who hit the woodwork three times, are third on six points, with Switzerland bottom on three after a 1-1 draw with visitors Spain.
"We won a match against a good Ukrainian team, and overall, we can be satisfied," coach Joachim Loew said.
"We wanted also to warm up as a team (ahead of next year's European Championship) and I think we did that to a certain extent.
"We had the game under control in the first half and we had a lot of pace. In the second half we were maybe not as focused."
After getting the all-clear from Leipzig's health authorities for the game to proceed, the Germans got off to a strong start but had to come from behind after Roman Yaremchuk scored against the run of play.
Leon Goretzka set up the next two goals, first launching a quick break and sending Sane through for the equaliser in the 23rd minute and then controlling a Robin Koch cross and lofting the ball for Werner to head the hosts in front 10 minutes later.
Germany, with their Bayern Munich contingent back in the squad after being rested in Wednesday 1-0 win over the Czech Republic in a friendly, still showed gaps in defence, having now managed just one clean sheet in their last seven matches.
They did not concede equalisers as in three of their previous five matches but were still lucky when Ukraine hit the post in the 53rd with Oleksandr Zinchenko's deflected shot.
Werner fired home his second in the 64th before Ukraine hit the woodwork twice more through Marlos and substitute Junior Moraes in a strong finish.
Sweden beat Croatia 2-1 to stave off Nations League relegation
Goals from Dejan Kulusevski and Marcus Danielsson snapped Sweden's four-game losing streak in the Nations League as they beat Croatia 2-1 in Stockholm on Saturday.
Needing a win to avoid relegation from Group A3, the victory keeps Sweden's survival hopes alive as they head into their final group game against France in Paris on Wednesday, despite still being bottom of the group.
Sweden boss Janne Andersson had to watch the game from home following a positive test for COVID-19 and 20-year-old forward Kulusevksi was chosen to start up front with Marcus Berg.
The decision paid off quickly as the Juventus player had a stinging shot saved and created another chance for winger Emil Forsberg. He gave his side the lead when he held off Mateo Kovacic to side-foot home his first goal for his country in the 36th minute.
Danielsson made it two in first-half stoppage time, swooping in at the near post to send Sebastian Larsson's corner flying into the net with a glancing header to cap Sweden's best 45 minutes of the competition so far.
They continued to dominate in the second half but Croatia muscled their way back into the game and pulled a goal back when an Ivan Perisic header deflected off Danielsson and into the net.
The tall defender almost made amends late on with another towering header from another set piece, but keeper Dominik Livakovic was able to keep his shot out.
The win leaves Sweden bottom of the group on three points, with the Croatians third on goal difference.
Norway's Nations League clash with Romania cancelled due to COVID-19
Norway's Nations League game away to Romania on Sunday has been cancelled following the quarantining of the Norwegian team by the nation's health authorities due to a positive COVID-19 test, European soccer's governing body UEFA has announced.
Norway's FA clashed with the country's health authorities as the squad prepared to leave Oslo on Saturday.
The health ministry insisted the team did not travel to Bucharest and should instead go into quarantine following a positive test for Galatasary right back Omar Elabdellaoui.
"The Norwegian Football Federation believes that we can travel within the regulations. The Norwegian government says no to this. We disagree with that, but of course we cannot defy the government," NFF president Terje Svendsen said in a statement.
"We are very disappointed that the authorities are forcing us to stay home. All the other 54 UEFA nations are playing international matches this week except Norway. This is very detrimental to the national team's ambitions in the short and long term," he added.
Norway, who beat Romania 4-0 in Oslo and are second in the standings, were also scheduled to play Nations League B Group 1 leaders Austria in their final Nations League game on Wednesday. The two teams are level on nine points from four games.