The Spanish Civil War (1936-1939), was fought between the left-wing Popular Front and the right-wing National Front. One of the first events that led to it occurred in 1931 when the King of Spain acquiesced to demands for democratic elections. In these elections, the populace made it clear that they wanted to have a republic and the King fled into exile. A general election later that year brought the Socialist Party into power, and Manuel Azaña became the prime minister.
In 1936, Azaña helped to organize four left-wing political parties into the Popular Front, which was opposed by the right-wing National Front. The Popular Front won the general elections that year and took over the government. Shortly thereafter, an economic crisis precipitated strikes, and the military revolted, led by Emilio Mola. Although the revolt was successful only in some areas of Spain, it was enough to make Azaña want to resign his post. However, other leaders believed that he could avert subsequent uprisings, so Azaña remained in power. Despite his best efforts, many Europeans belonging to the Socialist and Communist parties came to Spain to help the Popular Front in the Spanish Civil War.
During the Spanish Civil War, Antonio Salazar, the President of Portugal, Benito Mussolini, Prime Minister of Italy, and Adolf Hitler, Führer of Germany, supported the National Front in order to protect their authoritarian governments. Within Spain, the National Front also had the support of the Catholic Church. The Popular Front was supported by Mexico, the Soviet Union, and some Americans.
The first large-scale battles of the Spanish Civil War occurred in 1936 in Madrid, when the right-wing Nationalist Army bombed Madrid. Soon after that, the Nationalist Army took control of Badajoz City, killing and/or raping many within the city who were believed to support the Popular Front. In late 1936, the National Front appointed Francisco Franco as the commander of the Nationalist Army and chief of State.
A 1937 battle that took place in Barcelona resulted in the executions of many Popular Front leaders which weakened the Popular Front overall. Subsequently, the Popular Front-controlled Republican Army was entirely destroyed in a battle at Ebro in 1938. The National Front won Barcelona, Catalunya, and Madrid two years later, and the National Front took control of the government, which was headed by Francisco Franco. Once in power, Franco declared the Spanish Civil War over.