La Roja suffered a 2-1 home defeat to Switzerland on Saturday, with goals from Manuel Akanji and Breel Embolo knocking the hosts off the top of Nations League A Group 2 with one game remaining.
Manchester City centre-back Akanji put the visitors ahead in the 21st minute. Jordi Alba latched onto Marco Asensio’s pass and fired high into the net for the hosts 10 minutes into the second half.
However, another Switzerland corner was not cleared properly, allowing Borussia Monchengladbach striker Embolo to bundle in from close range.
The loss means Luis Enrique’s side must beat Portugal away on Tuesday to advance to the semi-finals. Portugal moved two points clear of Spain at the top of Group A2 after a much more peaceful night in Prague.
Diogo Dalot emerged as an unlikely hero, scoring his first two international goals. The right-back found himself in the position of a centre-forward, slotting home from close range before Bruno Fernandes completed a slick team move in first-half stoppage time.
Seven minutes into the second period, Dalot curled brilliantly into the bottom corner with his weaker left foot. Diogo Jota completed the scoring late on by heading in unmarked from a corner.
Meanwhile, Scotland only needs a point from their midweek match against Ukraine to be promoted to League A after coming from behind to defeat the Republic of Ireland 2-1 and maintain their lead in Group B1.
Norway’s promotion to League A was delayed after Erling Haaland was overshadowed by one of Europe’s other rising stars, Benjamin Sesko, in a 2-1 defeat to Slovenia.
Serbia tied Norway for first place in Group B4 after Aleksandar Mitrovic scored a hat-trick in a 4-1 thrashing of Sweden.
Israel’s late winner in a 2-1 win over Albania secured their promotion to League A. Northern Ireland won their first game of the tournament thanks to a stoppage-time header from Josh Magennis, as Ian Baraclough’s men came from behind to defeat Kosovo 2-1.