The 19th century was a turbulent time for Spain. Those in favour of reforming Spain's government vied for political power with conservatives, who tried to prevent reforms from taking place. Some liberals, in a tradition that had started with the Spanish Constitution of 1812, sought to limit the power of the monarchy of Spain and to establish a liberal state. The reforms of 1812 did not last after King Ferdinand VII dissolved the Constitution and ended the Trienio Liberal government. Twelve successful coups were carried out between 1814 and 1874. Until the 1850s, the economy of Spain was primarily based on agriculture. There was little development of a bourgeois industrial or commercial class. The land-based oligarchy remained powerful; a small number of people held large estates called latifundia as well as all the important government positions.
In 1868 popular uprisings led to the overthrow of Queen Isabella II of the House of Bourbon. Two distinct factors led to the uprisings: a series of urban riots and a liberal movement within the middle classes and the military (led by General Joan Prim) concerned with the ultra-conservatism of the monarchy. In 1873 Isabella's replacement, King Amadeo I of the House of Savoy, abdicated owing to increasing political pressure, and the short-lived First Spanish Republic was proclaimed. After the restoration of the Bourbons in December 1874, Carlists and Anarchists emerged in opposition to the monarchy. Alejandro Lerroux, Spanish politician and leader of the Radical Republican Party, helped bring republicanism to the fore in Catalonia, where poverty was particularly acute. Growing resentment of conscription and of the military culminated in the Tragic Week in Barcelona in 1909.
Spain was neutral in World War I. Following the war, wide swathes of Spanish society, including the armed forces, united in hopes of removing the corrupt central government, but were unsuccessful. Popular perception of communism as a major threat significantly increased during this period. In 1923 a military coup brought Miguel Primo de Rivera to power; as a result, Spain transitioned to government by military dictatorship. Support for the Rivera regime gradually faded, and he resigned in January 1930. He was replaced by General Dámaso Berenguer, who was in turn himself replaced by Admiral Juan Bautista Aznar-Cabañas; both men continued a policy of rule by decree. There was little support for the monarchy in the major cities. Consequently, King Alfonso XIII gave in to popular pressure for the establishment of a republic in 1931 and called municipal elections for 12 April of that year. The socialist and liberal republicans won almost all the provincial capitals, and following the resignation of Aznar's government, King Alfonso XIII fled the country. At this time, the Second Spanish Republic was formed. It remained in power until the culmination of the Spanish Civil War.
The revolutionary committee headed by Niceto Alcalá-Zamora became the provisional government, with Alcalá-Zamora as president and head of state. The republic had broad support from all segments of society. In May, an incident where a taxi driver was attacked outside a monarchist club sparked anti-clerical violence throughout Madrid and south-west Spain. The government's slow response disillusioned the right and reinforced their view that the Republic was determined to persecute the church. In June and July the Confederación Nacional del Trabajo, known as the CNT, called several strikes, which led to a violent incident between CNT members and the Civil Guard and a brutal crackdown by the Civil Guard and the army against the CNT in Seville. This led many workers to believe the Spanish Second Republic was just as oppressive as the monarchy and the CNT announced their intention of overthrowing it via revolution. Elections in June 1931 returned a large majority of Republicans and Socialists. With the onset of the Great Depression, the government attempted to assist rural Spain by instituting an eight-hour day and redistributing land tenure to farm workers.
The Church was a frequent target of the revolutionary left in the Republic and in the War. During the Civil War, revolutionaries destroyed/burned
some 20,000 churches, along with church artwork and tombs, books, archives, and palaces.
Vast number of affected buildings are today defunct.
Fascism remained a reactive threat, helped by controversial reforms to the military. In December a new reformist, liberal, and democratic constitution was declared. It included strong provisions enforcing a broad secularisation of the Catholic country, which included the abolishing of Catholic schools and charities, which many moderate committed Catholics opposed. Republican Manuel Azaña became prime minister of a minority government in October 1931. In 1933 the parties of the right won the general elections, largely owing to the anarchists' abstention from the vote, increased right-wing resentment of the incumbent government caused by a controversial decree implementing land reform, the Casas Viejas incident, and the formation of a right-wing alliance, Spanish Confederation of Autonomous Right-wing Groups (CEDA). The recent enfranchisement of women, most of whom voted for centre-right parties, was also a contributing factor.
Events in the period following November 1933, called the "black two years", seemed to make a civil war more likely. Alejandro Lerroux of the Radical Republican Party (RRP) formed a government, reversing changes made under the previous administration and granting amnesty to the collaborators of the unsuccessful uprising by General José Sanjurjo in August 1932. Some monarchists joined with the then fascist-nationalist Falange Española y de las JONS ("Falange") to help achieve their aims. Open violence occurred in the streets of Spanish cities, and militancy continued to increase, reflecting a movement towards radical upheaval, rather than peaceful democratic means as solutions. On 5 October 1934, the Acción Republicana and the Socialists (PSOE) and Communists attempted a general left-wing rebellion. The rebellion had a temporary success in Asturias and Barcelona, but was over in two weeks. Azaña was in Barcelona that day, and the Lerroux-CEDA government tried to implicate him. He was arrested and charged with complicity in the rebellion.
In the last months of 1934, two government collapses brought members of the CEDA into the government. Farm workers' wages were cut in half, and the military was purged of Republican members. A popular front alliance was organised, which narrowly won the 1936 elections. Azaña led a weak minority government, but soon replaced Zamora as president in April. Prime Minister Santiago Casares Quiroga ignored warnings of a military conspiracy involving several generals, who decided that the government had to be replaced to prevent the dissolution of Spain.
According to Stanley Payne, by July 1936 the situation in Spain had deteriorated massively. Spanish commentators spoke of chaos and preparation for revolution, foreign diplomats were making plans on what to do if revolution broke out and an interest in fascism was developing amongst the threatened. Payne states that by July 1936:
- "The frequent overt violations of the law, assaults on property, and political violence in Spain were without precedent for a modern European country not undergoing total revolution. These included massive, sometimes violent and destructive strike waves, large-scale illegal seizures of farmland in the south, a wave of arson and destruction of property, arbitrary closure of Catholic schools, seizure of churches and Catholic property in some areas, widespread censorship, thousands of arbitrary arrests, virtual impunity for criminal action by members of Popular Front parties, manipulation and politicisation of justice, arbitrary dissolution of rightist organisations, coercive elections in Cuenca and Granada that excluded all opposition, subversion of the security forces, and a substantial growth in political violence, resulting in more than three hundred deaths. Moreover, because local and provincial governments were forcibly taken over, decreed by the government in much of the country rather than secured via any elections, they tended to have a coercive cast akin to that of local governments taken over by Italian Fascists in northern Italy during the summer of 1922. Yet as of early July the centrist and rightist opposition in Spain remained divided and impotent."
Laia Balcells observes that polarisation in Spain just before the coup was so intense that physical confrontations between leftists and rightists were a routine occurrence in most localities; six days before the coup occurred, there was a riot between the two in the province of Teruel. Balcells notes that Spanish society was so divided along Left-Right lines that the monk Hilari Raguer stated that in his parish, instead of playing "cops and robbers", children would sometimes play "leftists and rightists." Within the first month of the Popular Front's government, nearly a quarter of the provincial governors had been removed due to their failure to prevent or control strikes, illegal land occupation, political violence and arson. The Popular Front government was more likely to persecute rightists for violence than leftist who committed similar acts. Azaña was hesitant to use the army to shoot or stop rioters or protestors as many of them supported his coalition. On the other hand, he was reluctant to disarm the military as be believed he needed them to stop insurrections from the extreme left. Illegal land occupation became widespread - poor tenant farmers knew the government was disinclined to stop them. By April 1936, nearly 100,000 peasants had appropriated 400,00 hectares of land and perhaps as may as 1 million hectares by the start of the civil war; for comparison, the 1931-33 land reform had granted only 6000 peasants 45,000 hectares. As many strikes occurred between April and July as had occurred in the entirety of 1931. Workers increasingly demanded less work and more pay. "Social crimes" - refusing to pay for goods and rent - became increasingly common by workers, particularly in Madrid. In some cases this was done in the company of armed militants. Conservatives, the middle classes, businessmen and landowners became convinced that revolution had already begun.