Rise of Liberalism
A bitter struggle developed between the liberals and conservatives (royalists). Constitutional government was reinstated in 1837, during the reign of Queen Isabella II (1833–68). The new constitution attempted to reconcile the two factions. However, the struggle for power continued, erupting into revolution in 1868. The royalists were defeated and Isabella was deposed. Many liberals proposed a federal republic and separation of church and state. However, a new constitution (1869) reestablished the monarchy and retained Roman Catholicism as the official religion.
Amadeo of Savoy, a son of Victor Emmanuel II of Italy, was chosen king. His short reign, 1870–73, was marked by continuous turmoil. In 1873 the Cortes (parliament) proclaimed the first Spanish republic. A federal form of government was instituted, but resulted in anarchy. In 1875 Alfonso II, son of Isabella II, was proclaimed king. During his reign internal peace was restored.
In the 1890's, rebellion in Cuba led to war with the United States (1898). Spain was defeated and lost Cuba, Puerto Rico, Guam, and the Philippines. (
Alfonso XIII came to the throne in 1902. He was immediately confronted with widespread unrest. Workers in industry and agriculture protested low wages, and regional movements broke out in opposition to centralized government. Spain remained neutral during World War I. Industry developed rapidly to meet the wartime needs of other countries. However, tensions increased as workers demanded social and labor reforms. In the postwar period, strikes and anarchism were widespread and the government was unable to maintain order.
In 1923, General Miguel Primo de Rivera seized power with the king's approval and established dictatorial control over the country. However, discontent with economic depression and resistance against the illegal government caused him to resign in 1930. The king attempted unsuccessfully to conciliate the parties of the left.
The Republicans (a leftist party) won an overwhelming victory in the 1931 elections, and the king went into voluntary exile. A new constitution established the Second Republic. The new regime provided for educational reform, freedom of religion, redistribution of land, and labor reform. However, the lower classes were impatient with the slowness of the reform movement and several uprisings broke out.

