Spain powered into the Euro last 16 as Group E runners-up on Wednesday, with their 5-0 thrashing leaving third-placed Slovakia out of the competition.
In the heat of Seville, the hosts initially needed the helping hand of Martin Dubravka before Aymeric Laporte's first Spain goal and second-half strikes from Pablo Sarabia, Ferran Torres and another own goal set up a meeting with Croatia on Monday in Copenhagen.
Spain, who drew 0-0 with Sweden and 1-1 with Poland, should have scored several more with Alvaro Morata missing a penalty.
Slovakia, who reached the last 16 at Euro 2016, earlier beat Poland 2-1 before losing 1-0 to Sweden but conceding five goals against Spain mean they will be among the two worst third-placed teams and go home.
The result also means Ukraine are through.
Spain players celebrate after the final whistle of the match. Photo: Cezaro De Luca/dpa.