Rayo Vallecano came close to becoming the first top-flight club to be eliminated in the first round of the Copa del Rey this season, needing a penalty shootout to get past fifth-division club Guijuelo.
After a 1-1 draw following extra time, Rayo won the shootout 4-3 after the hosts missed a pair of penalties.
Playing without veteran striker Radamel Falcao, Rayo took the lead with a goal by Jose Angel Pozo in the fifth minute and Guijuelo equalised through Daniel Garcia in the 19th.
Rayo played a man down from the 79th because of a red card to defender Kevin Rodrigues.
Another five first-division teams won against lower-tiered clubs.
Levante, last in the league standings, routed Huracan Melilla 8-0 with a hat-trick by Alex Blesa. Osasuna defeated San Agustin 4-0, Valencia got past Utrillas 3-0, Elche won 2-0 at Leioa and Cadiz trounced Villa de Fortuna 7-0 with three goals by Alvaro Negredo.
This season's edition of the Copa includes teams from all six divisions of Spanish soccer.
Atletico Madrid, Real Madrid, Barcelona and Athletic Bilbao, who will play in the Spanish Super Cup in January, are not playing in the opening round.
Australian Associated Press