Following the Glorious Revolution of September 1868, which led to the overthrow of Isabella II, a Provisional Government was established in Spain, marking the beginning of the Democratic Six Years (1868–1874). This government was a coalition of progressives, led by General Juan Prim, and unionists, headed by General Francisco Serrano, although the democrats were excluded due to political disagreements.
The period concluded with the search for a constitutional monarch who would accept the new rules of the game. Finally, Amadeus I of Savoy was elected and swore an oath to the Constitution in January 1871.
The abdication of Amadeo I in February 1873, faced with political instability and a lack of support, led to the proclamation of the First Spanish Republic by the Cortes. This regime was the first serious attempt to establish a republic in Spain and was marked by profound instability.
The First Spanish Republic lasted exactly from February 11, 1873 to December 29, 1874, that is, 1 year, 10 months and 18 days and had 5 presidents!: Estanislao Figueras (February 12 – June 11, 1873), Francisco Pi y Margall (June 11 – July 18, 1873), Nicolás Salmerón (July 18 – September 7, 1873), Emilio Castelar (September 7, 1873 – January 3, 1874), Francisco Serrano (January 3 – December 29, 1874).
In such a short time, the Spanish also had to endure three major conflicts: the Third Carlist War, the cantonal uprising, and the Ten Years' War in Cuba.
The situation worsened until, in January 1874, General Pavía dissolved the Cortes in a coup d'état, establishing a dictatorship under General Serrano. Finally, in December 1874, General Martínez Campos's proclamation in Sagunto restored the Bourbon monarchy under Alfonso XII. But that's another story.