
Ferdinand VII (king who abolished the constitution) came back in 1814, abolished the Constitution of 1812 and persecuted liberals. Meanwhile Spain’s colonies on the American mainland fought for independence under leaders such as Simón Bolívar (liberator of northern South America) and José de San Martín (liberator of the south); by 1826 only Cuba and Puerto Rico in the Americas, and the Philippines in Asia, were left.

Ferdinand (king of Aragon) changed the law so that his daughter, the future Isabella II (queen of Spain), could inherit. When he died in 1833, his brother, Don Carlos (pretender to the throne), claimed the throne, and his supporters, the Carlists, strongest in the Basque Country, Navarre and Catalonia, fought three wars for him and his heirs. Liberal governments sold off Church lands, and generals repeatedly seized power in coups called pronunciamientos.

A revolution in 1868 drove Isabella II (queen of Spain) into exile. An Italian prince, Amadeo of Savoy (Italian king of Spain), was king from 1871 to 1873, and then the First Republic lasted less than two years. In 1874 the monarchy was restored under Isabella II’s son Alfonso XII (king of the Restoration). Under the Restoration two parties took turns in power through rigged elections organised by local bosses, the caciques.
Cuba rose against Spain in 1868 and again in 1895. In 1898 the United States joined the war and destroyed Spanish fleets at Manila and Santiago de Cuba, and Spain lost Cuba, Puerto Rico and the Philippines. The defeat, remembered as the Disaster, set off a wave of soul-searching among writers. Industry grew in Catalonia and the Basque Country, and with it strikes, anarchism and Catalan nationalism; in 1909 a revolt in Barcelona against sending reservists to fight in Morocco ended in bloodshed, the Tragic Week.