[6] After the Dictatorship of Primo de Rivera, Spanish republican parties agreed through the Pact of San Sebastián (17 August 1930) to prepare for a change of regime in case of victories in upcoming elections.
On 12 April 1931, local elections gave a large and unexpected majority in Catalonia (including Barcelona) to the Republican Left of Catalonia[7] (Catalan: Esquerra Republicana de Catalunya, ERC), a party that had been founded three weeks earlier by the union of Macià's pro-independence Estat Català, the Catalan Republican Party, led by Lluís Companys, and the L'Opinió group.
The jurist Josep Oriol Anguera de Sojo [ca] was appointed president of the Territorial Audience of Barcelona[14] (the highest court of justice in Catalonia at the time).
[15] Macià even offered a ministry to the anarchist trade union CNT, but the anarcho-syndicalist organization finally refused to participate, claiming its traditional apoliticism.
A volunteer militia, the Civic Republican Guard (Catalan: Guàrdia Cívica Republicana) was raised in order to protect the Palace of the Generalitat and the sourrondings.