Spain boss Luis Enrique was left to rue an "undeserved" 3-2 defeat to Croatia in Zagreb as the hosts set up a Nations League decider with England.
Tin Jedvaj's stoppage-time strike earned the World Cup runners-up a first win of the tournament, inflicting Spain's second defeat in a row following their loss to England last month.
Croatia and England both have four points and the winner of Sunday's game at Wembley will overhaul Spain at the top of League A Group 4.
Spain could still advance to the finals next summer. A goalless draw in London would see Croatia relegated; a scoring draw and England would be demoted.
"I am quite happy with this match, the result is undeserved," Enrique told his post-match media conference.
"The group was, as we expected, very difficult with two of the best teams in the world."
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.
Barcelona midfielder Sergio Busquets told TDP: "We deserved more.
"We deserved to take the lead, but for one reason or another it wasn't to be and now we need to hope that England and Croatia draw on Sunday, because it's not in our hands.
"It was a very tough group, with strong teams, who had performed well at the World Cup.
"We've been the best side in the group, but occasional errors have cost us."
Jedvaj was thrilled with the win.
The Bayer Leverkusen defender said on uefa.com: "I am delighted and proud after this. I gave my best and this means a lot for us.
"It was a tough match. We knew that we needed to play for a win and we managed to show that the heavy loss in Spain was just a bad day.
"We are improving from match to match and now we are facing England. It will be difficult but we will try to win."
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', 'a7b843d5-78c1-4407-b5dc-9ec9356c236d');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Luis Enrique: Spain deserved better'});