The Second Spanish Republic was the left-oriented republican government that ruled Spain between April 1931 and March 1939, replacing the monarchy. It was established on April 14, 1931, two days after socialist and anarchist parties had won the cities elections, forcing Alfonso XIII to leave the country. Thus, with the Spanish king in exile in France, the political parties set up a provisional government represented by a Prime Minister. In December 1931, a republican Constitution was approved and a general election was held on December 10, 1931, with Niceto Alcalá Zamora being elected president.
Although the Second Spanish Republic was the outcome of the popular vote, this socialist government muffled right-oriented newspapers as communist and anarchist groups attacked conservatives and the Catholic Church, burning monasteries, convents, and killing businessmen and priests. These attacks had been preceded by miners and factory workers strikes , which were stirred up by the socialists, after center-right politcal parties had won the 1934 parliamentary election. In 1939, General Francisco Franco, the commander of the Morrocco garrison rose up in arms against the Soviet-backed republican government, triggering the Spanish Civil War, which lasted until 1939. Backed by Germany and Italy, the Spanish nationalist forces won the war as the republican government collapsed. As a result, General Francisco Franco was proclaimed chief of State, ruling Spain until 1975.