After the tumult of the First Spanish Republic, Spaniards were willing to accept a return to stability under Bourbon rule. Isabella II had abdicated in 1870 in favour of her son, Alfonso, who was now duly crowned Alfonso XII of Spain. 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 Martínez-Campos. The Republic was dissolved and Antonio Cánovas del Castillo, a trusted advisor to the king, was named Prime Minister on 31 December 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.