Tin Jedvaj's stoppage-time strike earned Croatia a thrilling 3-2 victory over Spain in Zagreb to set up a winner takes all Nations League clash with England.
Victory at Wembley on Sunday will earn Croatia a place in the inaugural finals of the tournament after the World Cup runners-up responded from two Spain equalisers.
Andrej Kramaric put Croatia in front after 54 minutes, but Spain levelled through Dani Ceballos within two minutes.
Jedvaj restored the lead, only for Sergio Ramos to convert from the penalty spot after 77 minutes when Sime Vrsaljko was ruled to have handled in the area.
Both sides sought a winner, but it was Jedvaj who netted three minutes into added time for Croatia to move on to four points, alongside England and two behind Spain.
Spain won the reverse fixture 6-0 in Elche in September and a goalless draw with England last month meant Croatia were still seeking their first goal of the competition.
That almost changed after just six minutes when Ivan Rakitic released Ivan Perisic down the left.
Perisic cut in on to his right foot and hit a low shot which David de Gea turned on to the post.
Next Perisic fizzed a cross towards Kramaric, but the striker could not get a decisive touch to send it goalwards.
😲 Croatia beat Spain in the Nations League tonight!
— Sporting Life Football (@SportingLifeFC) November 15, 2018
⚽️ Now there's a lot on the line when England face Croatia on Sunday...
🤞England win: 🏴 win group, 🇭🇷 relegated
Croatia win: 🇭🇷 1st, 🏴 relegated
0-0 draw: 🇪🇸 1st, 🇭🇷 relegated
Score draw: 🇪🇸 1st, 🏴 relegated pic.twitter.com/9c7PufeHvI
Spain were second best. Isco shot from the edge of the area, but Lovre Kalinic made a comfortable save to turn the ball over.
Croatia capitalised on poor Spanish defending nine minutes into the second half.
Ramos put Sergi Roberto under unnecessary pressure on Spain's right flank and the Barcelona right-back's lofted pass was intercepted by Perisic.
His header forwards fell kindly for Kramaric and the striker kept his composure to finish well.
The lead did not last long. Iago Aspas fed Isco in the left side of the box and the Real Madrid playmaker centred for Caballos, who showed desire to turn the ball in.
Rakitic tore through the Spain defence only to blast wide before the visitors spurned a chance to take the lead.
Kalinic lost Roberto's cross and Aspas lifted the ball on to the top of the crossbar from close range.
Frantic defending saw Isco thwarted after fine interplay with Caballos. Marco Asensio next had an effort blocked.
Having absorbed the pressure, it was Croatia who scored next when Luka Modric's pin-point cross was converted at the back post by Jedvaj.
Ante Rebic had an effort stopped by De Gea, who saved with his legs.
Alvaro Morata was next to be denied. Kalinic saved Isco's shot up into the air and Morata tried to send the rebound goalwards only for Vrsaljko to clear on the line.
Within moments, Spain had a penalty when Vrsaljko was adjudged to handled and Ramos scored.
The attacks continued, with Kramaric running at Spain. But he opted to shoot, rather than free Perisic.
There was still time for Croatia and substitute Josip Brekalo made space for a shot which De Gea saved, but only as far as Jedvaj, who netted to spark celebrations.
Michy Batshuayi fired Belgium to the brink of the finals with his brace in a 2-0 home victory over Iceland.
The Chelsea striker, on loan at Valencia this season, tucked Thomas Meunier's pass away after the hour mark before making the three points safe in the last 10 minutes.
However, Switzerland can still take top spot by beating the Red Devils in Lucerne on Sunday.
Austria's goalless draw with Bosnia and Herzegovina in Vienna had the effect of promoting the Balkan nation and relegating Northern Ireland from Group Three of League B.
In League C, Willi Orban and Adam Szalai boosted Hungary to a 2-0 victory against Estonia, but the Magyars could not leapfrog Greece in Group Two as Angelos Anastasiadis' men triumphed 1-0 against Finland thanks to Albin Granlund's own goal in the 25th minute.
The result denied Finland promotion on the night and they will go to Hungary in an anxious mood this weekend as Greece, who next host Estonia, retain an outside chance of catching them.
In League D, Latvia drew 1-1 with Kazakhstan as Deniss Rakels responded to Gafurzhan Suyumbayev's first-half opener.
Andorra moved third in their pool by drawing 1-1 with Georgia thanks to an exchange of goals between Giorgi Chakvetadze and Cristian Martinez while Belarus leapfrogged Luxembourg to go first in Group Two - ahead of a crunch trip to San Marino - by beating their fellow landlocked country 2-0.
Stanislav Dragun scored both the goals, either side of half-time.
Elsewhere, Vitalie Damascan rubbed salt into San Marino's wounds following a miserable campaign by firing Moldova to a 1-0 win in Serravalle.