History of Zafarraya
According to most historians, the name Zafarraya comes from the Arabic, Faha-al-ra iyya, meaning 'field of shepherds'. Others argue that it originates from Saiarraya, which translates to 'limit of territory'.
Zafarraya has a long history of human occupation. It was once a Neanderthal settlement, as shown by the remains of the Hombre de Zafarraya (Man of Zafarraya) in the Boquete de Zafarraya cave, dated 30,000 years ago. The cave appears to have served as a hunting site overlooking the Llano de Zafarraya (also known as polje), rather than as a permanent settlement.
By the 2nd century BC, communities associated with the El Argar culture settled in easily defensible locations. Later, Phoenician and Roman camps appeared. During the 8th century, Zafarraya came under Muslim rule. During the Islamic period, the Llano became an important route between Málaga, Vélez, Alhama and Granada, protected by a network of castles and watchtowers. After the Christian Reconquest, it became dependent on Vélez-Málaga in 1488; however, Alhama de Granada disputed their claim to the land and continued to do so into the 18th and 19th centuries. Zafarraya eventually became an independent municipality in 1813, provoking serious clashes with neighbouring Alhama de Granada over the exploitation of Júrtiga and the Sierra de Loja, which ultimately fell into Zafarraya's hands.
In 1833, with the provincial ordinance carried out by Javier de Burgos, Zafarraya became part of the province of Granada. In 1850, Queen Isabel II agreed to separate the town, for administrative and judicial purposes, from Alhama de Granada, and added it to Loja. In 1871, the first agreement was reached to establish the municipal boundary between Zafarraya and Alhama de Granada.
On Christmas Day 1884, Zafarraya was struck by a devastating earthquake with its epicentre between the nearby towns of Ventas de Zafarraya and Arenas del Rey. The earthquake caused 25 deaths and 75 injuries, with 30% of the buildings collapsing, including the old church whose ruins remain today. The city was rebuilt according to new urban plans, turning the town into a space of straight and orderly streets and redesigned buildings.