It all began with a coup d'etat on July, 1936, carried out by a part of the army against the Second Spanish Republic, carefully planned by José Sanjurjo, Emilio Mola (who commanded the uprising) and Francisco Franco among other generals. The coup was more successful where in the zones where the people had voted for the right wing, and failed where the Popular Front was victorious, such as in Madrid and Barcelona.
The Republican side fought for the legitimate government of Spain, the Popular Front (a coalition made up of left wing parties supported by unions and labor movements). The rebel side, who called themselves "national side", made up of the high military ranks and supported by the Spanish Falange (fascist movements), the Catholic Church and the conservative right, as well as the highest Spanish classes, who saw their interest at risk after the Popular Front won the elections.
The nationalist parties defended the institution of a totalitarian state. The monarchists wanted the return of Alfonso XIII. The carlists wished to implement a new dynasty. But they did have something in common and this was the fear of the most fervent anticlericalism and possible proletariat uprises.
The coup mostly failed and the country was divided into two parts, giving way to one of the bloodiest civil wars of the 20th Century: the Spanish Civil War. The national side had Castile and Galicia's cereal and grain reserve and the cattle, as well as the León and Riotinto (Huelva) carbon mines. Above all it had a much more prepared army and the Spanish Legion, the Regulars and the African Army.
The republican zone kept the industrial regions, wheat from La Mancha and orchard produce from Levante (eastern Spain), as well as the gold reserves of Banco de España. However the army units were quite disjointed, as most officers rebelled. The Navy (without many of its officers) and the air force remained in Republican hands.
After the war broke out, the national side was commanded by a group of generals who established a militarized and authoritarian state. Of course the state structures of the second Spanish republic were destroyed. The Popular Front lost control of the situation and power fell to organized labor committees who were not subject to any kind of centralized power.
The repression was enormous from both sides. Executions and murder were the order of the day. On the national side, most of it's strength was directed to labor and peasant militants, but also against some intellectuals such as Federico García Lorca. The ones who suffered the republican repression were mostly priests and clerics and some lays related to church, and the wealthier classes. After the initial chaos, where all hell broke loose, both the government and the military authorities regained control, and the repression became much more organized.
The nationalist forces received help from Portugal, Italy and Germany. The USSR supported the Popular Front and they also had help from Mexico (the Mexican revolution had taken place recently). In a way, it was a preview of what was to come during the Second World War, when Europe was divided into fascist regimes and those who wanted to maintain their independence. However France, Great Britain and USA stayed out of it, either because they didn't want to get into a conflict with Germany or because they preferred the nationalist side to win.
During the first few days of war the outcome was uncertain, and it was still possible that the insurrections would be crushed, but upon the 5th day (July 21) all hope of a quick resolution died when the rebels conquered the naval port Ferrol. This triumph encouraged fascist powers to support the nationalists. On the following days general Sanjurjo died in a plane accident and the command of the rebels went to Franco and Emilio Mola. Mola would be the only one to contend with Franco for a while.
A key element to understand the final triumph of the nationalists was the help given by German and Italian planes, which allowed the quick transportation of the African Army to the Peninsula. The Spanish Legion and the Regulars were professional forces that by far surpassed the disorganized labour and peasant militias and the Popular Front. They made a quick advance to Madrid. However on they way, general Yagüe decided to make a detour to Badajoz. The city fell and the brutal repression that followed was one of themost brutal of the war and shocked the whole world. There were huge losses.
On October 1936, the nationalist forces under the command of José Enrique Varela arrived at Madrid's outskirts and in November, the battle of Madrid began. Soon they took over Alcorcón, Leganés, Getafe and Cuatro Vientos. The fall of the capital into rebel troops seemed imminent.
After witnessing the nationalist forces' military superiority, left wing parties and labor unions encouraged the people to rise in defense of their city. They shouted"¡No Pasarán!" ("they won't get through"). The morale of the Madrileños increased at the arrival of external reinforcements. The International Brigades and bodies of voluntaries organized by the communist party, as well as Russian tanks and planes came to help to defend the capital, and for now the Battle of Madrid's outcome was still uncertain.
The city was bombed by German Junker planes and fierce combat took place in Casa de Campo, Ciudad Universitaria and Puente de los Franceses. The republican troops managed to resist and finally Francisco Franco ordered a frontal assault of the city, however he did not succeed.
After Francisco Franco failed to take Madrid he planned to encircle the city which resulted in the battles of Guadalajara and Jarama in March 1937, with victories for the republicans and the battle of Brunete with nationalist victory, however it was still inconclusive. Malaga had been recently taken by nationalist forces. Now Franco planned a new strategy. He would no longer try to shorten the war, but attack the Republican's weakest spots.
In the spring of that same year, the Nationalist troops conquered the northern part of the country that was still Republican and also isolated: Basque Country, Cantabria and Asturias. The famous bombing of Guernica took place during this campaign, when a German air group sent by Hitler bombed a city that posed no military interest in the Spanish Civil War theatre and devastated it. It inspired Pablo Picasso's most famous painting: Guernica. During the Basque campaign general Mola died in a plane accident.
Soon the Nationalist troops had conquered all of the north of Spain with grave consequences for the Republicans. Not only did they lose the carbon and iron mines, but it also meant that franquista troops were able to concentrate all their entire force towards the south.
In December 1937, an intensive republican offensive took place in Teruel, but they failed. After securing Teruel, Francisco Franco attacked Aragon. On April 15, 1938 the nationalist troops arrived at Vinaroz and the Republican zone was divided in two.
The last republican campaign lead to the Battle of the Ebro in July of the same year, it resulted in more than 100,000 deaths, and it finally exhausted the republican morale and reserves. The last Nationalist operation was against Catalonia. After taking Barcelona, the franquist forces got access to the French borders in February 1939. There had been a huge exodus, and more than 500,000 people had escaped to France, they were contained in refugee camps. It was the end of the Spanish civil war.
It's impossible to calculate the number of casualties and only an approximation can be made, but it is estimated that some 500,000 died (though some versions say it's closer to one million) Thousands were exiled, many of them to France and South America. The rebels -or Nationalists- successfully overthrew the Republican government and claimed victory. Francisco Franco established a conservative dictatorship and all the right-wing parties assimilated into Franco's regime.
The Spanish Civil War inspired several important artists; there are thousands of paintings, novels, poetry and films that recount this dark time in Spanish history. It also effectively changed the Spanish school of thought in regards to war. Up until today there are serious war crimes investigated. Tombs have been dug up, parents whose children were taken for them are still trying to find them, investigations to find Garcia Lorca's body are being still underway. This was only possible after Franco's death in 1975 but every year, new information keeps appearing that proves once and for all how macabre and shocking the events of the civil war really were.