Spain striker Alvaro Morata has answered vicious criticism by helping fire his side to a 5-3 win over Croatia after extra time to reach the quarter-finals of Euro 2020 in a breathless match laced with storylines.
In the best game of the tournament so far, Spain fell behind in the first half to a Pedri own goal from near the halfway line after an incredible error from keeper Unai Simon.
But the three-time European champions recovered their poise and looked on their way to a comfortable victory with goals from Pablo Sarabia, Cesar Azpilicueta and Ferran Torres.
Showing the spirit that took them to the last World Cup final, Croatia staged an astonishing comeback with goals from Mislav Orsic in the 85th minute and a Mario Pasalic header in added time to force the extra period.
Luis Enrique's side showed tremendous character though and prevailed with Morata's superb strike in the 100th minute and a goal from Mikel Oyarzabal in the 103rd.
Spain celebrated a first knockout win in a major tournament since winning Euro 2012 to set up a quarter-final against France or Switzerland in St Petersburg.
"We suffered so much, it has been such a long time since we have won a knockout match and we managed to finally do it against the World Cup runners-up," said Spain defender Cesar Azpilicueta.
"We conceded two goals in seven minutes, but we were superior to them in extra time and we deserved to go through."
Captain Sergio Busquets also praised his side's mentality and defended Simon, who compensated for his first-half calamity with a superb save to thwart Andrej Kramaric and stop Croatia from taking the lead early in extra-time.
"Unai knows he's got our total confidence. The goal was bad luck but he has a cool head on him and is ambitious and he showed that today. He was ultra-secure after the goal and made some top saves," Busquets said.
"When Croatia changed their system, they flooded the pitch high up and we didn't adjust quickly enough. But overall I'm so happy with the result, how we handled the extra time and the fact that we are in the quarter-finals."
Croatia head home with their heads held high but are still waiting to win a knockout game at a Euros.
Morata has been the centre of attention of Spain's campaign amid inconsistent performances and criticism from his own supporters, which took an ugly turn during last week's 5-0 win over Slovakia.
His wife and children were threatened by supporters in Seville and he complained of facing death threats before the game, prompting coach Luis Enrique to urge police action.
Morata has been accused of having a fragile disposition, but showed steel when Spain's confidence was on the floor, controlling a Dani Olmo cross with one foot before blasting into the roof of the net.
Substitute Oyarzabal struck moments later to increase Spain's lead and this time Croatia had no response.
The result made them the first side in a Euros to score five or more goals in consecutive matches, with Morata joining Fernando Torres as his nation's joint-highest scorer in the competition on five goals.
Pedri earned an unwanted record: his own goal from 49 yards was the longest own goal in a Euros and the tournament's first-ever from outside the box.