Muslim rule in the Iberian Peninsula began with the Umayyad conquest in 711 and, through the Caliphate of Córdoba and later the Emirate of Granada, lasted until the fall of Granada in 1492 — leaving behind the Alhambra, the Mezquita of Córdoba, and centuries of scholarship in astronomy and medicine. Spain's Muslim population today is a modern, separate story: Moroccan labor migration from the 1960s onward, accelerated by Spain's economic boom in the 1990s and 2000s, now makes up the largest single group, alongside older continuous Muslim populations in the North African enclaves of Ceuta and Melilla.
Madrid sits at just over 40°N, giving it a moderate seasonal swing in daylight compared with Spain's far south — a Ramadan fast in Madrid runs noticeably longer in a summer month than the same fast observed in Ceuta or Málaga, which is one of many reasons a single national prayer table would be less accurate than calculating times for each city's own coordinates.
Despite its Islamic history, modern Spain has no unified Spanish Islamic body issuing its own astronomical convention, so the Comisión Islámica de España and most mosques nationwide rely on the Muslim World League's 18°/17° angles — the same default used across most of Western Europe, chosen for consistency rather than any local formula unique to Spain.
No — despite nearly 800 years of Islamic rule, today's mosques in Spain use the modern Muslim World League method like most of Western Europe, since no surviving religious authority from that era set a calculation convention still in use.
Ceuta and Melilla are Spanish enclaves on Morocco's Mediterranean coast, geographically closer to Morocco's own time zone and coordinates than to Madrid, so their calculated Fajr and Maghrib times sit closer to nearby Moroccan cities like Tétouan than to the Spanish capital.
Yes, though modestly — Madrid's roughly 40°N latitude gives it slightly longer summer daylight than Málaga or Seville further south, so a Ramadan that falls in June or July means a marginally longer daily fast in the capital.
Jumu'ah generally replaces Dhuhr and is held close to the calculated Dhuhr time shown here, though individual mosques in Madrid set their own khutbah start times around it.