It appears that the Spanish Anthem was based in music composed in the Islamic Hispania and that the Hispano-muslim musician and philosopher Abû Bakr Muḥammad Ibn Yaḥyà ibn aṣ-Ṣâ'igh at-Tûjîbî Ibn Bâjja Al-tujibi (Arabic أبو بكر محمد بن يحيى بن الصائغ), known as Avempace or Ibn Bājjah (Arabic: ابن باجه) was the author of the melody in the 11th or 12th century A.D.
So, here's the evidence that the anthem has its origins in the Tawshiya (instrumental prelude) of the Dary movement of the Nawba Al-Istihlál.