Post–World War II Spain was still affected strongly by the results of the Spanish civil war of 1936–39. Francisco Franco’s authoritarian regime continued to censor the press and did not abide by a constitution.

After the defeat of fascist governments in World War II, Franco did mitigate some fascist tendencies within his government, stressing instead the Roman Catholic Church, the monarchy, and society as the corporatist pillars of Spain, but not enough to prevent economic isolation by other international actors.

However, at the same time industrialization and economic development contributed to a contrary force of secularization. The corporatism of the state thus began to depend more and more on Franco.

Spain’s colonial influence would not succeed Franco, either. The Spanish ended their rule over Spanish Morocco in 1956, and over the rest of their African colonies over the next two decades. In 1968 Spanish Guinea gained independence and renamed itself Equatorial Guinea.

Right before Franco died, Morocco’s King Hassan II took advantage of Spain’s weakness and took over Spain’s only remaining colony—Western Sahara—in the Green March. However, despite these colonial losses, Franco did pass on to his successor, King Juan Carlos, the beginnings of an economic and political liberalization that would reap the "Spanish Miracle".

Indeed, the hierarchical nature of the state did not persist after Franco’s death in 1975. Juan Carlos appointed Prime Minister Adolfo Suárez to rush in an era of democratization through legislation sometimes referred to as the "new Bourbon restoration". Suárez was elected in 1977 under the Unión de Centro Democrático party.

After the elections, the Spanish constitution was drafted in 1978 by a committee made up of the deputies of most of the main political groups. It was signed by the king in 1979. Suárez’s power weakened, however, and he resigned as president and party leader on January 29, 1981.

Finding a successor was difficult in what became a very tense political and economic climate due to economic struggle, difficulty creating a new territorial organization of Spain, Euskadi Ta Askatasuna (or ETA, a Basque separatist organization) terrorist attacks, and the army’s lukewarm support of democratic institutions.

In this political atmosphere, democratic governance in Spain was tested by a 1981 coup that was called 23-F and El Tejerazo. Antonio Tejero, with 200 armed officers from the Guardia Civil, stormed the Spanish Congress of Deputies as it was electing Leopoldo Calvo Sotelo the new Spanish president.

Tejero and the officers held the cabinet and parliament hostage. No one was harmed and the coup ended largely because the king called upon the army to abide by the orders of the democratically elected civilian authorities.

Social democratic rule began in 1982 with Felipe González’s Socialist Party winning the elections. Spain’s democratic rule was fairly stable from that point until 1996. Domestic reforms under González’s administration included the legalization of abortion, education reforms, and increased personal freedoms.

Also during this era, Spain made many advances in integrating back into the international economic and political community. It joined the North Atlantic Treaty Organization (NATO) and the European Economic Community in 1986. With integration came some important changes for the Spanish economy.

Technological and industrial investment in the country increased, despite its persistently high unemployment rate. Ironically, although Spain was able to make progress in international integration, it still suffered from regional separatism and regional groups seeking autonomy from Spain.

In 1996 González was defeated, in part due to government corruption, and José María Aznar’s Popular Party (PP) took over. During the PP’s term, Spain’s economy benefited from high domestic demand and export-led growth.

It continued down the path of European integration, joining the Economic and Monetary Union (EMU) and adopting the euro in 1999. Yet again Spain suffered from internal divisions. ETA attacked tourists and Spanish officials again in 1999. Nevertheless, the PP won the 2000 elections.

The attacks continued. In 2001 army Lieutenant Colonel Pedro Antonio Blanco García was assassinated. An enormous street demonstration of over 1 million Spaniards protesting the assassination occurred the next day. Unfortunately, the killings continued.

After some ETA members were killed in a car bomb that August, the ETA retaliated with a series of the bloodiest attacks since 1992, which included the assassination of Supreme Court justice José Francisco Querol Lombardero, his driver, bodyguard, and a bystander, and injuries to 60 others.

In 2003 Aznar supported the U.S. "War on Terror" in the Iraq War, possibly resulting in the March 11, 2004, train bombings in Madrid. Nearly 200 people were killed and over 1,500 injured. Although the government blamed ETA, al-Qaeda operatives carried out the attacks.

In the elections that followed, the PP lost to the Socialist Party. José Luis Rodríguez Zapatero took over as prime minister. Aznar, however, had decided not to run, despite not being barred from running for a third term.

Zapatero immediately withdrew Spanish troops from Iraq. Under his administration, Spain approved a same-sex marriage law with the support of a majority of the population. In contrast to Aznar, Zapatero’s relations with the United States were strained. However, he maintained good relations with the United Nations and the European Union.