World War II and After
Spain remained officially neutral during World War II, but Franco openly favored the Axis powers and allowed Spanish volunteers to fight for Germany. When the United Nations was organized in 1945, Spain was denied membership because of its close ties with the Axis powers. The United States gave Spain financial aid and in 1953 obtained the right to build military bases there. In 1955 Spain was admitted to the UN.
During the mid-1960's, the government began a policy of gradual liberalization. Press censorship was relaxed, and in 1967 popular elections were held for certain members of the Cortes. However, labor unrest, student rioting, and antigovernment demonstrations caused suspension of a number of civil liberties.
The Basques began agitating for independence in the 1960's; in the 1970's, some turned to terrorism. Meanwhile, in 1969 Franco announced that Prince Juan Carlos, grandson of Alfonso XIII, would be his eventual successor as head of state.
Franco died in 1975. His designated heir ascended the throne as Juan Carlos I. Early in his reign, King Juan Carlos took steps to bring democracy to Spain. His reforms included amnesty for political prisoners, the ending of censorship, and the legalization of multiparty politics. In 1977 parliamentary elections were held, providing Spain with representative government for the first time since 1939. The following year a democratic constitution was adopted.
During 1980–83, the Spanish government divided the country into 17 autonomous regions, giving each limited powers of self-government. In the Basque region, however, terrorists waged a campaign for complete independence from Spain. Meanwhile, in 1981 a group of conservative army officers, alarmed at Spain's democratic reforms, tried to overthrow the government. The coup was put down without bloodshed by King Juan Carlos when most of the army proved loyal and heeded his command to restore order.
In 1982 Spain joined the North Atlantic Treaty Organization (NATO). Also that year the Socialist party won a majority in parliamentary elections, coming into power for the first time since the Civil War. In 1986 Spain joined the European Community (now the European Union). The Socialists remained in power, either as the majority party or as the leading party in a coalition, for more than 13 years. Elections in 1996 brought to power a coalition led by a conservative party.
On March 11, 2004, a group of Islamic extremists set off ten bombs on four trains in Madrid killing 191 persons. In general elections held three days later, the right-wing Popular Party won a surprising victory.
ETA, a terrorist group seeking independence for Spain's Basque region, has become a serious problem for the nation. Hundreds of people have been killed in ETA's campaign of violence. Although ETA declared a cease-fire in March, 2006, the group claimed responsibility for a deadly bomb attack at a Madrid airport in December of that same year. ETA officially announced an end to the cease-fire in June, 2007.

