Loja uprising
The Loja uprising was a short-lived insurrection in Loja, Andalucia in 1861 that is considered one of the earliest socialist uprisings in Spain. Overview

Background
Andalucia in the mid-nineteenth century was a centre of republican resistance against the Bourbon reign of Queen Isabella II who had been queen regnant since 1833. The clandestine liberal Democratic Party, established in 1849, found significant support from labourers and peasants in rural Andalucia where there was widespread social inequality. Earlier Andalucian peasant revolts took place in El Arahal and Utrera in 1857 but these were not particularly political by nature. Uprising
On June 28, 1861, , a local blacksmith and leader in the Democratic Party, led 600 men to nearby Iznájar and took the town with little resistance. Pérez read a republican and socialist manifesto and encouraged local inhabitants to resist monarchist rule. The next day, Pérez mustered an army with upwards of 10,000 armed men and took Loja by force proclaiming a republic. Loja was especially symbolic as the hometown of conservative politician Ramón María Narváez who was one of the federal government's chief ministers, having served as prime minister on a number of occasions between 1844 and 1868. The insurgents led by Pérez proceeded to loot the royal estates in Loja and redistribute available lands to the lower classes. Similar uprisings took place in nearby locales Archidona and Alhama de Granada, in part aided by secret Carbonari societies and loosely inspired by Garibaldi's recent successes in Italy. Pérez had hoped that the Loja uprising would inspire similar insurrections from Democratic Party members throughout Spain but a larger national revolution failed to materialize. The Captain General of Granada sent troops to retake Loja and on July 4, 1861, defeated the rebel forces in a bloody battle. The remaining forces under Pérez fled to Alhama de Granada where it was decided to march on Granada itself in a last-ditch attempt to incite further insurrection. The rebel army was subsequently defeated at  and Pérez managed to escape to Madrid. Aftermath
In the wake of the Loja uprising, Queen Isabella visited the region in 1862 in an effort to quell republican sedition by granting amnesty to all surviving insurrectionaries. While this temporarily extinguished revolutionary fervor, the Queen would be forced to abdicate only six years later during the Glorious Revolution at the beginning of the Sexenio Democrático. Loja would rise against the federal government again along with much of southern Spain during the radical Cantonal rebellion of 1873. References

Rebellions in Spain
1861 in Spain
History of Granada