Caniles is typical of the Baza and Altiplano area in that its origins date back many centuries, with strongest and perhaps most evident links from the time of the Moorish occupation. Although the original name, 'Canilles' is thought to have Latin origins, during the time of the Moors it was known as 'Qanalis', which later became Canilles de Baca (Baza). Apparently Canilles paid a large sum of money in 1646 to become independent of Baza, to become called simply - Caniles.
There are Neolithic remains in the Cueva de la Pastor and the Poblado de los Montones de Piedra. Traces of the Bronze Age are also evident in Rejano, Carriza, the San Sebastianquarter and Fuente de la Salud. The Pheonicians also left their mark, when using the natural river paths of the Bodurria, Morax and Valcabra as gateways for trading between Andalusia and the Levante region.
In 1487, when the Catholics ousted the Moors, Gonzalo Fernández de Córdoba took over the area. Once the Moors were gone, the area had few inhabitants and was dependent on Baza, until 1679 when Carlos II released it from this jurisdiction.
It was in the 20 th century that Caniles enjoyed some prosperous times with the construction of the new railway line and a sugar refinery. However it was to be thrown once again into crisis during the years of the Spanish Civil War. Then in the 1950's and 1960's there was a mass exodus from this and many other parts of rural Andalusia to other parts of Spain and Europe. The countryside once again became under populated, to the detriment of agricultural production. Many people are being drawn back to the 'good life' now enjoy the wildlife as well as the rural tranquillity during vacation time, far from the bustle of the coast and larger cities.