Spain earned their first win at Euro 2020 in style as they thrashed Slovakia to progress as Group E runners-up and set up a last-16 tie with Croatia.
Luis Enrique's side head into the knockout stages on the back of their best attacking display of the tournament, proving far too good for a seriously below-par Slovakia.
Aymeric Laporte, Pablo Sarabia and Ferran Torres all scored after a bizarre own goal from Newcastle's Martin Dubravka broke the deadlock at La Cartuja Stadium in Seville.
The Slovakia goalkeeper, who earlier saved a penalty from Alvaro Morata, punched the ball into his own net after Sarabia's effort hit the crossbar and looped into the air.
Juraj Kucka inadvertently completed the rout for Spain, bundling the ball over his own line from close range.
Spain's meeting with Croatia will take place in Copenhagen on Monday at 17:00 BST, while Slovakia are out.
Spain impress as Group E drama unfolds
After draws against Sweden and Poland, in which Spain struggled to find the target despite boasting 85% and then 76.4% of possession, Luis Enrique compared his side to a bottle of Cava waiting to be uncorked at Euro 2020.
This was more reminiscent of the sparkling football that saw La Roja crowned European champions in 2008 and 2012, either side of a World Cup victory, although Slovakia did not provide much of a test after Dubravka pushed Sarabia's effort into his own net instead of behind for a corner.
Less than 20 minutes earlier he had saved a penalty from Morata, whose effort was a comfortable height for the goalkeeper.
The kick, awarded after Dutch referee Bjorn Kuipers consulted the pitchside monitor, was the fifth successive penalty Spain have missed and they have failed to score with six of their past nine at European Championships.
Manchester City defender Laporte headed in Gerard Moreno's cross to double Spain's lead and swift moves in the second half saw Sarabia and Torres finish smartly from close range, before Slovakia's sluggish performance was compounded by a second own goal.
There were more cheers from the Seville crowd but not for a sixth Spanish goal, rather drama in the other group game as Poland fought back to level from 2-0 down against Sweden with six minutes left.
That would have sent Spain through top of the group, but a 94th-minute winner for Sweden means 2018 World Cup finalists Croatia await.
Martin Dubravka became the first goalkeeper to save a penalty and score an own goal in the same Euros gamePlayer of the match
Thiago AlcántaraThiago Alcántara
Line-ups
Slovakia
Formation 4-2-3-1
1Dúbravka
2Pekarík5Satka14Skriniar15Hubocan
19Kucka25Hromada
18Haraslín17Hamsik20Mak
8Duda
1Dúbravka2Pekarík5Satka14SkriniarBooked at 90mins15Hubocan19Kucka25HromadaSubstituted forLobotkaat 45'minutes18HaraslínSubstituted forSuslovat 69'minutes17HamsikSubstituted forBénesat 90'minutes20MakSubstituted forWeissat 69'minutes8DudaBooked at 12minsSubstituted forDurisat 45'minutesSubstitutes
4Valjent6Gregus7Weiss10Suslov11Bénes12Kuciak13Hrosovsky16Hancko21Duris22Lobotka23Rodák24KoscelnikSpain
Formation 4-3-3
23Simón
2Azpilicueta12García24Laporte18Alba
8Koke5Busquets26González
22Sarabia7Morata9Moreno
23Simón2AzpilicuetaSubstituted forOyarzabalat 77'minutes12GarcíaSubstituted forTorresat 71'minutes24Laporte18AlbaBooked at 60mins8Koke5BusquetsBooked at 40minsSubstituted forThiago Alcántaraat 71'minutes26González22Sarabia7MorataSubstituted forTorresat 66'minutes9MorenoSubstituted forTraoréat 77'minutesSubstitutes
1de Gea4Torres6Llorente10Thiago Alcántara11Torres13Sánchez14Gayà16Rodri17Ruiz19Olmo20Traoré21OyarzabalReferee:Björn KuipersAttendance:11,204Live Text
Match ends, Slovakia 0, Spain 5.
Second Half ends, Slovakia 0, Spain 5.
Milan Skriniar (Slovakia) is shown the yellow card.
Koke (Spain) wins a free kick in the attacking half.
Foul by Milan Skriniar (Slovakia).
Substitution, Slovakia. László Bénes replaces Marek Hamsik.
Attempt missed. Mikel Oyarzabal (Spain) left footed shot from the left side of the box is close, but misses to the left.
Attempt missed. Pablo Sarabia (Spain) left footed shot from outside the box is high and wide to the left. Assisted by Pau Torres.
Corner, Spain. Conceded by Michal Duris.
Substitution, Spain. Mikel Oyarzabal replaces César Azpilicueta.
Substitution, Spain. Adama Traoré replaces Gerard Moreno.
Corner, Spain. Conceded by Peter Pekarík.
Thiago (Spain) wins a free kick in the attacking half.
Foul by Stanislav Lobotka (Slovakia).
Own Goal by Juraj Kucka, Slovakia. Slovakia 0, Spain 5.
Attempt saved. Pau Torres (Spain) header from very close range is saved in the centre of the goal. Assisted by Aymeric Laporte with a headed pass.
Attempt blocked. Thiago (Spain) right footed shot from the centre of the box is blocked.
Substitution, Spain. Pau Torres replaces Eric García.
Substitution, Spain. Thiago replaces Sergio Busquets.
Pedri (Spain) wins a free kick on the left wing.