Spain capitalised on a Slovakia implosion to seal their place in the last 16 with a 5-0 hammering in Seville, which also knocked their opponents out of the competition.
Alvaro Morata saw his early penalty - awarded by VAR - saved by Martin Dubravka before Spain strolled to a victory that takes them through in second place, setting up a last-16 clash with Croatia in Copenhagen on Monday.
Dubravka went from hero to zero after punching the rebound from a Pablo Sarabia shot into his own net on the half-hour, before Aymeric Laporte rose highest to double Spain's lead in injury time and net his first goal for his country after the goalkeeper had gone walkabout.
Slovakia emerged throwing caution to the wind, knowing only a point would give them real hope of progression, but quickly sank without trace once Sarabia swept home Jordi Alba's low ball 11 minutes into the second half.
Ferran Torres then scored a deft backheel flick with his first touch (67) as Sarabia turned provider, before Juraj Kucka put through his own net to cap a dreadful Slovakia display and take the own-goal tally at Euro 2020 to a bewildering eight.
Slovakia: Dubravka (4), Pekarik (5), Satka (5), Skriniar (6), Hubocan (5), Kucka (5), Hromada (5), Haraslin (4), Hamsik (5), Mak (4), Duda (4).
Subs: Lobotka (6), Duris (5), Weiss (5), Suslov (5), Benes (n/a).
Spain: Simon (6), Azpilicueta (7), Garcia (6), Laporte (7), Jordi Alba (7), Koke (7), Busquets (8), Pedri (7), Sarabia (9), Morata (5), Moreno (6).
Subs: F Torres (7), Thiago (6), P Torres (7), Traore (6), Oyarzabal (6).
Man of the match: Pablo Sarabia
- How the teams lined up | In-depth stats and analysis
- Euro 2020 group tables | Who needs what to qualify for last 16?
Spain click into gear to pummel poor Slovakia
A new-look Spain, revitalised by the return of Sergio Busquets as one of four changes, looked sharp from the off but owed Slovakia a debt for a golden chance to take the lead when Jakub Hromada caught Koke with an attempted clearance and after a VAR review, gave Spain a penalty.
Morata's tame spot-kick was kept out by Dubravka, whose hero status was soon removed when he attempted to punch Sarabia's long-range effort clear after it had rebounded off the bar, and instead scuffed it into his own goal under little pressure.
Perhaps overeager to atone for his error, the Newcastle goalkeeper was again at fault for Spain's second, leaving Laporte an unguarded net after deciding to race to the edge of his six-yard box and failing to stop Gerard Moreno delivering a cross to the Manchester City defender.
The respective half-time scores left Slovakia third in Group E but still on the brink of a group-stage exit, and Stefan Tarkovic responded by sending on two substitutes at the break.
After a bright start to the half, it was back to normal as Slovakia conceded a third, made by a fine Alba take and pass into the six-yard box, and finished smartly by Sarabia.
Luis Enrique's fine afternoon improved further when Torres, sent on as a substitute only moments earlier, turned home Sarabia's cross from a short corner before another sub, Pau Torres, provided the fifth when his header from a free-kick was turned onto Kucka's leg by Dubravka and rebounded in.
Spain had looked irresistible since half-time and could have had a sixth when Mikel Oyarzabal narrowly missed connecting with another Alba cross, but a woeful Slovakia, who sunk without trace, provided them no sign of a stern test in Seville, and cannot qualify for the last-16 due to their inferior goal difference.
Man of the match - Pablo Sarabia
With Moreno moved to the left to accommodate him, Sarabia made the most of his first start of the tournament with a hand in their first goal - albeit not as big as Dubravka's - before getting on the scoresheet himself, and teeing up Torres' backheeled third.
The PSG forward missed only eight passes all game and looks likely to start against Croatia in the last 16 on this form.
- Spain equalled the largest margin of victory in a game at the European Championships, becoming the fifth different side to win by five goals in the competition (after France and Denmark in 1984, the Netherlands in 2000 and Sweden in 2004).
- This was Spain's 50th win at a major tournament (World Cup & Euros), becoming the fourth European side to reach this milestone of victories, after Germany, Italy and France.
- Štefan Tarkovic suffered back-to-back defeats for the first time since taking charge of Slovakia, with tonight being his 12th game at the helm.
- Spain scored five goals in a single European Championship match for the very first time, with this being their 43rd game in the competition.
- Since making his debut for the national side in October 2019, Gerard Moreno has been directly involved in 10 goals for Spain (five goals and five assists) - more than any other player for them in this period.
- With what was his first touch in the game, Ferran Torres scored just 44 seconds after coming on as a substitute for Spain - the quickest goal scored by a substitute at the European Championships since fellow Spaniard Juan Carlos Valerón in 2004 (39 seconds v Russia).
Spain will face Croatia in Copenhagen in their last-16 tie on Monday, June 28; kick-off at 5pm.
Slovakia, now confirmed as eliminated from the tournament, travel to Slovenia in their next match on September 9 for a 2022 World Cup qualifier; kick-off at 7.45pm.