Spain suffered a 2-1 defeat by Switzerland as goals from Manuel Akanji and Breel Embolo knocked the hosts off the top of Nations League A-Group 2 on Saturday with one game left to play.
The Swiss held firm against last year's finalists for most of the game and handed their rivals only their second home loss in almost 20 years and their first in Spain since 2018.
The Spaniards are now in second place on eight points, having been leapfrogged by Portugal, who breezed past Czech Republic 4-0 away to reach 10 points.
Cristiano Ronaldo's side will make the final four with at least a home draw in Tuesday's crunch game against Spain, who must win in Braga to qualify for the semi-finals.
Switzerland are third on six points, two above than Czechs who they will face on Tuesday in a battle to avoid relegation.
Akanji opened the scoring with a header from a corner in the 21st minute, but Jordi Alba equalised for the hosts with a cross-shot from a counter-attack 10 minutes after the break.
Three minutes later, however, Embolo got the winner with a close-range strike from a corner after Akanji flicked the ball towards the six-yard-box where the striker turned it goalwards.
"We played against rivals that were really aggressive, pressing, physically very strong, who prevented us from playing our style of soccer," Spain coach Luis Enrique told TVE.
"We were not on target, really erratic, the worse I can remember since I've been coaching this team. "We need to fix that because now we have a final at Portugal. We need to go there and win. There is no other way."
Despite having 70% possession, Spain lacked energy for most of the match and barely posed a threat to Yann Sommers goal until Alba scored with their first shot on target.
The Swiss were comfortable sitting back and waiting for a pedestrian Spain who were unimaginative on an uninspired night for their highly-rated Barcelona midfielders Pedri and Gavi.
It was not until very late in the second half that the hosts created chances but they were kept out by Sommer who made two critical saves to deny substitutes Marcos Llorente and Borja Iglesias.