1876, which formalised the constitutional monarchy that had resulted from the restoration of Alfonso and limited suffrage to reduce the political influence of the working class and assuage the voting support from the wealthy minority becoming the protected status quo. Cánovas del Castillo played a key role in bringing an end to the last Carlist threat to Bourbon authority (1876) by merging a group of dissident Carlist deputies with his own Conservative party. More significantly, his term in office saw the victory achieved by the governmental Spanish troops in the Third Carlist War, the occupation of the Basque territory and the decree establishing an end to the centuries-long Basque specific status (July 1876) that resulted in its annexation to a centralist Spain. Against a backdrop of martial law imposed across the Basque Provinces (and possibly Navarre), heated negotiations with Liberal Basque high-ranking officials led to the establishment of the first Basque Economic Agreement (1878). An artificial two-party system designed to reconcile the competing militarist, Catholic and Carlist power bases led to an alternating prime ministership (known as the turno pacifico) with the progressive Práxedes Mateo Sagasta after 1881. He also assumed the functions of the head of state during the regency of María Cristina after Alfonso's death in 1885. Political crisis By the late 1880s, Cánovas' policies were under threat from two sources. First, his overseas policy was increasingly untenable. A policy of repression against Cuban nationalists was ultimately ineffective and Spain's authority was challenged most seriously by the 1895 rebellion led by José Martí. Spain's policy against Cuban independence brought her increasingly into conflict with the United States, an antagonism that culminated in the Spanish–American War of 1898. Second, the political repression of Spain's working class was growing increasingly troublesome, and pressure for expanded suffrage mounted amid widespread discontent with the cacique system of electoral manipulation. Cánovas' policies included mass arrests and a policy of torture: During a religious procession in 1896, at Barcelona, a bomb was thrown. Immediately three hundred men and women were arrested. Some were Anarchists, but the majority were trade unionists and Socialists. They were thrown into the notorious prison at the fortress of Montjuïc in Barcelona and tortured. After a number had been killed, or had gone insane, their cases were taken up by the liberal press of Europe, resulting in the release of a few survivors. Reputedly it was Cánovas del Castillo who