Spain passed up the chance to seal progress to the Nations League finals as it was beaten 3-2 by Croatia, undone by a 93rd-minute winner from Tin Jedvaj.
The result leaves Group 4 wide open ahead of its final fixture between England and Croatia on Sunday. The victor will qualify, while Spain can still go through if the match at Wembley finishes in a draw.
Croatia was a deserving winner in Zagreb, where Jedvaj scored twice — his first international goals — to snatch a memorable victory at the end of a pulsating contest.
Andrej Kramaric had put Croatia ahead but twice Spain came back, as Dani Ceballos’ equaliser and Sergio Ramos’ penalty looked to have earned it a point, before Jedvaj prodded in deep into injury-time on Thursday.
Croatia will now head to London with a spring in its step while Spain is left to ponder back-to-back defeats under new coach Luis Enrique, following its surprise loss by the same scoreline at home to England last month.
Safe from relegation
Spain is at least safe from relegation, which cannot be said of either England or Croatia, who could still both finish first or last come Sunday night. England will be relegated if it loses or is held to a score draw. Croatia will go down if it is beaten or draws 0-0.
The results: League A: Group 2: Belgium 2 (Batshuayi 65, 81) bt Iceland 0.
Group 4: Croatia 3 (Kramaric 54, Jedvaj 69, 90+3) bt Spain 2 (Ceballos 56, Ramos 78-pen).
League B: Group 3: Austria 0 drew with Bosnia and Herzegovina 0.
League C: Group 2: Greece 1 (Granlund 25-og) bt Finland 0; Hungary 2 (Orban 8, Szalai 69) bt Estonia 0.
League D: Group 1: Kazakhstan 1 (Suyumbayev 37) drew with Latvia 1 (Rakels 49); Andorra 1 (Martinez 63) drew with Georgia 1 (Chakvetadze 9).
Group 2: Luxembourg 0 lost to Belarus 2 (Dragun 37, 54); San Marino 0 lost to Moldova 1 (Damascan 78).