Historical context leading to the Spanish Civil War
The background of the Spanish Civil War dates back to the end of the 19th century, when the owners of large estates, called "latifundios", held most of the power in a land-based oligarchy. The landowners' power was unsuccessfully challenged by the industrial and merchant sectors. In 1868 popular uprisings led to the overthrow of Queen Isabella II of the House of Bourbon. In 1873 Isabella's replacement, King Amadeo I of the House of Savoy, abdicated due 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 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. After the First World War, the working class, the industrial class, and the military united in hopes of removing the corrupt central government, but were unsuccessful. Fears of communism grew. A military coup brought Miguel Primo de Rivera to power in 1923, and he ran Spain as a military dictatorship. Support for his regime gradually faded, and he resigned in January 1930. There was little support for the monarchy in the major cities, and King Alfonso XIII abdicated; the Second Spanish Republic was formed, whose power would remain until the culmination of the Spanish Civil War. Monarchists would continue to oppose the Republic.
The revolutionary committee headed by Niceto Alcalá-Zamora became the provisional government, with Zamora as the President and Head of State. The Republic had broad support from all segments of society; 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 giving tenure to farm workers. Land reform and working conditions remained important issues throughout the lifetime of the Republic. Fascism remained a reactive threat, helped by controversial reforms to the military. In December a new reformist, liberal, and democratic constitution was declared. The constitution secularised the government, and this, coupled with their slowness to respond to a wave of anti-clerical violence prompted committed Catholics to become disillusioned with the incumbent coalition government. In October 1931, Manuel Azaña became Prime Minister of a minority government. The Right won the elections of 1933 following an unsuccessful uprising by General José Sanjurjo in August 1932, who would later lead the coup that started the civil war.
Events in the period following November 1933, called the "black biennium", seemed to make a civil war more likely. Alejandro Lerroux of the Radical Republican Party (RRP) formed a government with the support of CEDA and rolled back all major changes made under the previous administration, he also granted amnesty to General José Sanjurjo, who had attempted an unsuccessful coup in 1932. Some monarchists moved to the Fascist Falange Española to help achieve their aims. In response, the socialist party (PSOE) became more extreme, setting up a revolutionary committee and training the socialist youth in secret. Open violence occurred in the streets of Spanish cities and militancy continued to increase right up until the start of the civil war, reflecting a movement towards radical upheaval rather than peaceful democratic means as a solution to Spain's problems. In the last months of 1934, two government collapses brought members of the Spanish Confederation of the Autonomous Right (CEDA) into the government, making it more right-wing. Farm workers' wages were halved, and the military was purged of republican members and reformed. A Popular Front alliance was organised, which won the 1936 elections. Azaña led a weak minority government, but soon replaced Zamora as president in April. Prime Minister Casares failed to heed warnings of a military conspiracy involving several generals, who decided that the government had to be replaced if the dissolution of Spain was to be prevented. They organised a military coup in July, which started the Spanish Civil War.
Constitutional monarchy.
19th century.
The 19th century was a turbulent time for Spain. Those in favour of reforming the Spanish government vied for political power with conservatives who intended to prevent such reforms from being implemented. In a tradition that started with the Spanish Constitution of 1812, many liberals sought to curtail the authority of the Spanish monarchy as well as to establish a nation-state under their ideology and philosophy. The reforms of 1812 were short-lived as they were almost immediately overturned by King Ferdinand VII when he dissolved the aforementioned constitution. This ended the Trienio Liberal government. Twelve successful coups were eventually carried out in the sixty-year period between 1814 and 1874. There were several attempts to realign the political system to match social reality. 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 of the important government positions. The landowners' power was challenged by the industrial and merchant sectors, largely unsuccessfully. In addition to these regime changes and hierarchies, there was a series of civil wars that transpired in Spain known as the Carlist Wars throughout the middle of the century. There were three such wars: the First Carlist War (1833–1840), the Second Carlist War (1846–1849), and the Third Carlist War (1872–1876). During these wars, a right-wing political movement known as Carlism fought to institute a monarchial dynasty under a different branch of the House of Bourbon that was predicated and descended upon Don Infante Carlos María Isidro of Molina.
In 1868, popular uprisings led to the overthrow of Queen Isabella II of the House of Bourbon and her replacement with Amadeo I of the House of Savoy. 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), who were concerned about the ultra-conservatism of the monarchy. In 1873 Amadeo I abdicated due to increasing political pressure and the First Spanish Republic was proclaimed. However, the intellectuals behind the Republic were powerless to prevent a descent into chaos. Uprisings were crushed by the military, and eventually the Republic was overthrown by a coup d'état of General Arsenio Martínez Campos in 1874, leading to the restoration of the Bourbons under Alfonso XII. Despite the introduction of universal male suffrage in 1890, elections were controlled by local political bosses ("caciques").
The most traditionalist sectors of the political sphere systematically tried to prevent liberal reforms and to sustain the patrilineal monarchy. The Carlists – supporters of Infante Carlos and his descendants – fought to promote Spanish tradition and Catholicism against the liberalism of successive Spanish governments. The Carlists attempted to restore the historic liberties and broad regional autonomy granted to the Basque Country and Catalonia by their "fueros" (regional charters). At times they allied with nationalists (separate from the National Faction during the civil war itself), including during the Carlist Wars.
Periodically, anarchism became popular among the working class, and was far stronger in Spain than anywhere else in Europe at the time. Anarchists were easily defeated in clashes with government forces.
20th century.
In 1897, an Italian anarchist assassinated Prime Minister Antonio Cánovas del Castillo, motivated by a growing number of arrests and the use of torture by the government. The loss of Cuba, Spain's last valuable colony, in the Spanish–American War of 1898 hit exports from Catalonia hardest; there were acts of terrorism and actions by "agents provocateurs" in Barcelona. In the first two decades of the 20th century, the industrial working class grew in number. There was a growing discontent in the Basque country and Catalonia, where much of Spain's industry was based. They believed that the government favoured agrarianism and therefore failed to represent their interests. The average illiteracy rate was 64%, with considerable regional variation. Poverty in some areas was great and mass emigration to the New World occurred in the first decade of the century.
Spain's socialist party, the Spanish Socialist Workers' Party (, PSOE) and its associated trade union, the "Unión General de Trabajadores" (UGT), gained support. The UGT grew from 8,000 members in 1908 to 200,000 in 1920. Branch offices ("Casas del pueblo") of the unions were established in major cities. The UGT was constantly fearful of losing ground to the anarchists. It was respected for its discipline during strikes. However, it was centrist and anti-Catalan, with only 10,000 members in Barcelona as late as 1936. The PSOE and the UGT were based on a simple form of Marxism, one that assumed an inevitable revolution, and were isolationist in character. When the UGT moved their headquarters from Barcelona to Madrid in 1899, many industrial workers in Catalonia were no longer able to access it. Some elements of the PSOE recognised the need for cooperation with republican parties. The right-wing movement of maurismo, distinctly featuring a growing authoritarian pulsion, coalesced in 1913. While largely discredited after 1923, it served as a breeding ground for the future ranks of the authoritarian right wing. 
In 1912 the Reformist Party was founded, which attracted intellectuals. Figures like its leader, Alejandro Lerroux, helped attract wide support from the working class. His advocacy of anti-clericalism made him a successful demagogue in Barcelona. He argued that the Catholic Church was inseparable from the system of oppression the people were under. It was around this time that republicanism came to the fore.
The military was keen to avoid the break-up of the state and was increasingly inward-looking following the loss of Cuba. Regional nationalism, perceived as separatism, was frowned upon. In 1905 the army attacked the headquarters of two satirical magazines in Catalonia believed to be undermining the government. To appease the military, the government outlawed negative comments about the military or Spain itself in the Spanish press. Resentment of the military and of conscription grew with the disastrous Rif War of 1909 in Spanish Morocco. Lerroux's support of the army's aims lost him support. Events culminated in the Tragic Week () in Barcelona in 1909, when working class groups rioted against the call-up of reservists. 48 churches and similar institutions were burned in anti-clerical attacks. The riot was finally ended by the military; 1,725 members of such groups were put on trial, with five people sentenced to death. These events led to the establishment of the National Confederation of Labour (, CNT), an anarchist-controlled trade union committed to anarcho-syndicalism. It had over a million members by 1923.
Increasing exports during the First World War led to a boom in industry and declining living standards in the industrial areas, particularly Catalonia and the Basque country. There was high inflation. The industrial sector resented its subjugation by the agrarian central government. Along with concerns about antiquated promotion systems and political corruption, the war in Morocco had caused divisions in the military. Regenerationism became popular, and the working class, industrial class, and the military were united in their hope of removing the corrupt central government. However, these hopes were defeated in 1917 and 1918 when the various political parties representing these groups were either appeased or suppressed by the central government, one by one. The industrialists eventually backed the government as a way to restore order. After the formation of the Communist International in 1919, there was a growing fear of communism within Spain and growing repression on the part of the government through military means. The PSOE split, with the more left-wing members founding the Communist Party in 1921. The Restoration government failed to cope with an increasing number of strikes among the industrial workers in the north and the agricultural workers in the south.
Miguel Primo de Rivera came to power in a military coup in 1923 and ran Spain as a military dictatorship. He handed monopolistic control of trade union power to the UGT, and introduced a sweeping programme of public works. These public works were extremely wasteful, including hydroelectric dams and highways causing the deficit to double between 1925 and 1929. Spain's financial situation was made far worse by the pegging of the peseta to the gold standard and by 1931 the peseta had lost nearly half its value. The UGT was brought into the government to set up