Spain’s conquest by France benefited Latin American anti-colonialists who resented the Imperial Spanish government’s policies that favored Spanish-born citizens (Peninsulars) over those born overseas (Criollos) and demanded retroversion of the sovereignty to the people. Starting in 1809 Spain’s American colonies began a series of revolutions and declared independence, leading to the Spanish American wars of independence that ended Spanish control over its mainland colonies in the Americas. King Ferdinand VII’s attempt to re-assert control proved futile as he faced opposition not only in the colonies but also in Spain and army revolts followed, led by liberal officers. By the end of 1826, the only American colonies Spain held were Cuba and Puerto Rico.
In the late 19th century nationalist movements arose in the Philippines and Cuba. In 1895 and 1896 the Cuban War of Independence and the Philippine Revolution broke out and eventually the United States became involved. The Spanish–American War was fought in the spring of 1898 and resulted in Spain losing the last of its once vast colonial empire outside of North Africa.
Although the period around the turn of the century was one of increasing prosperity, the 20th century brought little social peace; Spain played a minor part in the scramble for Africa, with the colonization of Western Sahara, Spanish Morocco and Equatorial Guinea. It remained neutral during World War I. The heavy losses suffered during the Rif War in Morocco brought discredit to the government and undermined the monarchy.
After a period of dictatorship during the governments of Generals Miguel Primo de Rivera and Dámaso Berenguer and Admiral Aznar-Cabañas (1923–1931), the first elections since 1923, largely understood as a plebiscite on Monarchy, took place: the 12 April 1931 municipal elections. These gave a resounding victory to the Republican-Socialist candidacies in large cities and provincial capitals, with a majority of monarchist councilors in rural areas. The king left the country and the proclamation of the Republic on 14 April ensued, with the formation of a provisional government.
A constitution for the country was passed in October 1931 following the June 1931 Constituent general election, and a series of cabinets presided by Manuel Azaña supported by republican parties and the PSOE followed. In the election held in 1933 the right triumphed and in 1936, the left. During the Second Republic there was a great political and social upheaval, marked by a sharp radicalization of the left and the right. The violent acts during this period included the burning of churches, the 1932 failed coup d’état led by José Sanjurjo, the Revolution of 1934 and numerous attacks against rival political leaders. On the other hand, it is also during the Second Republic when important reforms to modernize the country were initiated: a democratic constitution, agrarian reform, restructuring of the army, political decentralization and women’s right to vote.
Civil War and Francoist Dictatorship:
The Spanish Civil War broke out in 1936: on 17 and 18 July, part of the military carried out a coup d’état that triumphed in only part of the country. The situation led to a civil war, in which the territory was divided into two zones: one under the authority of the Republican government, that counted on outside support from the Soviet Union and Mexico (and from International Brigades), and the other controlled by the putschists (the Nationalist or rebel faction), most critically supported by Nazi Germany and Fascist Italy. The Republic was not supported by the Western powers due to the British-led policy of non-intervention. General Francisco Franco was sworn in as the supreme leader of the rebels on 1 October 1936.