The Spanish Civil War began in July 1936 after a military coup by Spanish forces in North Africa failed to secure complete control over the country. Their unsuccessful attempt to overthrow the government of the Second Spanish Republic left the country divided between the generally left-leaning and urban Republicans and the conservative Nationalist rebels.
Having unified the Nationalist forces in 1937, Franco secured assistance from Hitler in Germany and Mussolini in Italy who provided both military equipment and personnel. Meanwhile the USSR provided assistance to the Republicans, even though all three countries had previously signed a non-intervention agreement.
By the end of 1938 the Nationalists had split the Republican-controlled areas in two, allowing them to focus on capturing Catalonia while keeping Madrid under siege. The fall of Catalonia in February 1939 triggered the resignation of the President of the Republic and the decision by both Britain and France to recognise the Nationalist government.
With Republican forces fleeing across the border into France, a coup was launched against the Prime Minister Juan Negrín with the intention of negotiating a peace deal with the Nationalists. However, Franco refused to accept anything other than unconditional surrender. By 27 March the Nationalists were facing virtually no resistance as they marched into previously Republican-held territory. Madrid surrendered the next day, and Nationalist troops seized the remaining Republican areas by the end of the month. On 1 April, Franco went on the radio to proclaim victory.