Although the former queen, Isabella II was still alive, she recognized that she was too divisive as a leader, and abdicated in 1870 in favor of her son, Alfonso, who was duly crowned Alfonso XII of Spain. After the tumult of the First Spanish Republic, Spaniards were willing to accept a return to stability under Bourbon rule. The Republican armies in Spain which were resisting a Carlist insurrection pronounced their allegiance to Alfonso in the winter of 1874?1875, led by Brigadier General Martinez Campos. The Republic was dissolved and Antonio Canovas del Castillo, a trusted advisor to the king, was named Prime Minister on New Year's Eve, 1874. The Carlist insurrection was put down vigorously by the new king, who took an active role in the war and rapidly gained the support of most of his countrymen.
A system of turnos was established in Spain in which the liberals, led by Práxedes Mateo Sagasta and the conservatives, led by Antonio Canovas del Castillo, alternated in control of the government. A modicum of stability and economic progress was restored to Spain during Alfonso XII's rule. His death in 1885, followed by the assassination of Canovas del Castillo in 1897, destabilized the government.