Spain remained officially neutral in World Wars I and II while Nazis and Italian Fascist helped Franco's efforts during the Civil War, thus getting later asylum for war criminals, but suffered through a devastating Civil War (1936 - 1939). During Franco's rule, Spain remained largely economically and culturally isolated from the outside world, but began to catch up economically with its European neighbors.
A right winged military dictatorship, Spain saw its political parties banned, except for the official party (Falange), also saw banned labor unions, and forbade any political display, always using violence and intimidation to achieve its goals.
Under Franco, Spain actively sought the return of Gibraltar by the UK, and gained some support for its cause at the United Nations. During the 1960s, Spain began imposing restrictions on Gibraltar, culminating in the closure of the border in 1969. It was not fully reopened until 1985.
Spanish rule in Morocco ended in 1967. Though militarily victorious in the 1957 -1958 Moroccan invasion of Spanish West Africa, Spain gradually relinquished its remaining African colonies. Spanish Guinea was granted independence as Equatorial Guinea in 1968, while the Moroccan enclave of Ifni had been ceded to Morocco in 1969.
The latter years of Franco's rule saw some economic and political liberalization, the Spanish Miracle, including the birth of a tourism industry. Francisco Franco ruled until his death on 20 November 1975, when control was given to King Juan Carlos.
In the last few months before Franco's death, the Spanish state went into a paralysis. This was capitalized upon by King Hassan II of Morocco, who ordered the 'Green March' into Western Sahara, Spain's last colonial possession.