This is the oldest building in Toledo you can walk into, and one of the oldest standing buildings in Spain. It was raised in 999 — the year 390 of the Hijra — in the caliphate of Hishām II, paid for by one Aḥmad ibn Ḥadīdī, as a small neighbourhood oratory beside the city gate of Bāb al-Mardūm. All of that is recorded in the inscription itself: a band of Kufic Arabic built out of shaped brick on the south-west façade, which was found in 1899 when a later wall covering it was pulled down.
The mosque is about eight metres square. Four columns, carrying reused Visigothic and late-Roman capitals, divide it into nine bays, and every one of the nine vaults over them is different — interlacing ribs of the kind the builders of the Great Mosque of Córdoba had worked out a generation earlier. Stand in the middle and look up slowly; that ceiling is the reason architectural historians come here.
After 1085 the building passed into Christian hands and was consecrated as a church, and a horseshoe-arched apse in brick was added at the east end — dated by the monument’s own account to 1182, and generally reckoned the earliest surviving Mudéjar work anywhere. Traces of Romanesque wall painting survive in it. The result is a single small room in which the Islamic and the Christian halves are separated by about 180 years and no argument at all.
The name comes from the legend: that when Alfonso VI rode into Toledo in 1085 his horse knelt at this spot, and behind a blocked-up wall a lamp was found still burning before a crucifix, lit since Visigothic times. Take it for what it is.
Outside, the terraced garden has been excavated. A Roman road of granite flagstones about five metres wide runs north–south across the northern esplanade, and under the Mudéjar apse archaeologists found a second, thicker apse and a cave cut into the rock, both belonging to a Roman-era building. The garden is also the best rest stop on the climb up from the Puerta de Bisagra.
One footnote for anyone counting mosques: this is not the last one. The Mezquita de Tornerías, a few minutes below Zocodover, has been dated by recent excavation to the ninth or tenth century and now holds Castilla-La Mancha’s craft promotion centre — €3, closed Mondays, and almost nobody goes in.