On the arrival of Amadeus in Spain, Ruiz Zorilla became minister of public works for a short time, and resigned by way of protesting against Serrano and Topete entering the councils of the new king.
She went into exile at the end of September 1868, after her Moderado generals had made a slight show of resistance that was crushed at the battle of Alcolea by Marshals Serrano and Prim.
The Cortes went on wrangling for a day and night until, at daybreak on the 3rd of January 1874, General Pavia forcibly ejected the deputies, closed and dissolved the Cortes, and called up Marshal Serrano to form a provisional government.
It served, however, to weaken the prestige of Sagastas administration just when a Dynastic Left was being formed by some discontented Liberals, headed by Marshal Serrano and his nephew, General Lopez-Dominguez.
Canovas crowned his policy by countenancing the formation of a Liberal party under Sagasta, flanked by Marshal Serrano and other Liberal generals, which took office in 1881.
In the background Marshal Serrano and many politicians and military men steadily advocated a coup d'etat in order to avert the triumph of the republicans.
Throughout the revolutionary period he represented in cabinets with Prim, Serrano and Ruiz Zorilla, and lastly under King Amadeus, the advanced Radical tendencies of the men who wanted to give Spain a democratic monarchy.
He took office under Marshal Serrano during 1874, after the pronunciamiento of General Pavia had done away with the Cortes and the Federal Republic. He vainly attempted to crush the Carlists in 1874, and to check the Alphonsist military conspiracy that overthrew the government of Marshal Serrano at the end of December 1874.
At the end of the year, when Marshal Serrano left Madrid to take command of the northern army, General Martinez Campos, who had long been working more or less openly for the king, carried off some battalions of the central army to Sagunto, rallied to his own flag the troops sent against him, and entered Valencia in the king's name.
He returned, via Gibraltar, with Prim, Serrano and others, to take part in the rising at Cadiz, which culminated in the revolution of September 1868, and Sagasta was in succession a minister several times under Serrano and then under King Amadeo of Savoy, 1868-187 2.