Spain recovered from a bizarre own goal and a barnstorming Croatia fightback to reach the Euro 2020 quarter-finals with a dramatic 5-3 extra-time victory on Monday.
Goals from the much-maligned Alvaro Morata and Mikel Oyarzabal finally settled an eventful contest in Copenhagen that ended 3-3 after 90 minutes.
Croatia had taken an unexpected early lead when Spain goalkeeper Unai Simon allowed a backpass from Pedri to squirm into the net.
Spain responded superbly through Pablo Sarabia, Cesar Azpilicueta and Ferran Torres but Croatia hit back with two goals in the last five minutes of normal time from substitutes Mislav Orsic and Mario Pasalic.
Croatia carried their momentum into extra-time but Simon made a fine save and Spain ultimately went on to secure a place in the last eight.
Luis Enrique's side will now play the winner of France and Switzerland.
Expected Goals (xG) analysis: Spain's attack clicking but defence vulnerable
Jake Osgathorpe
Spain scored five for the second game running at Euro 2020, but will they get away with defensive issues deeper into the tournament?
Luis Enrique's side have been generating chance after chance at the tournament, but have only started taking those opportunities in their last two matches against Slovakia and Croatia.
The premise of Expected Goals (xG) is that these things even out over time and regression to the mean will occur.
That is what we have seen with Spain. They were creating the chances in matches against Sweden and Poland (combined 6.07 xGF) while scoring just one, so the goals were always going to come if they continued to create in a similar manner - which they have.
After their extra-time victory over Croatia, Spain have now averaged a whopping 3.53 xGF per game, which is a staggering figure.
Even more impressive is that they have created 19 non-penalty big chances (0.35 xG or greater), so they aren't racking up their total by taking pot shots from distance, they are carving out clear-cut opportunities.
If they continue in the same manner, expect La Furia Roja to keep scoring plenty of goals.
However, they do continue to look vulnerable defensively, leaving themselves exposed regularly.
Croatia racked up 3.05 xG as they came from 3-1 down to take the game to extra-time, and in total Spain have allowed 5.63 xGA, an average of 1.40 xGA per game.
While that doesn't seem a lot - especially when they are producing more than double that in attack - it is concerning that this total has come from just 24 shots, meaning that the average shot they concede has an xG of 0.23, which is huge.
In fact, 42% of the chances they are conceding are classified as 'big chances' based on xG, meaning that when their opponents do get a chance (which is rare), it does tend to be one with a high probability of being scored.
This will be a huge issue for Spain unless it is addressed, as better teams will exploit them.
If they continue to create at the same rate, they have a good chance of being European champions once again. If they don't, they'll need to find a way to fix problems at the back, as their potent attack is currently masking their defensive issues.