The history of LGBTQ (lesbian, gay, bisexual, transgender, and queer) individuals in Spain is characterized by a transition from periods of severe legal and social repression to the establishment of comprehensive legal protections and equal rights in the late 20th and early 21st centuries.
Pre-Modern Period
In Roman Spain, attitudes toward same-sex relations were influenced by Roman social structures, where status and role were often more significant than the gender of the partner. Following the adoption of Christianity and the subsequent Visigothic rule, legal codes began to penalize homosexual acts. During the Middle Ages, under Islamic rule in Al-Andalus, historical accounts suggest a degree of tolerance or poetic celebration of same-sex desire among the elite, though legal frameworks based on Sharia officially prohibited it. Following the Reconquista, the Spanish Inquisition prosecuted "sodomy" as a religious and civil crime, often resulting in severe punishments, including execution.
The 19th and Early 20th Centuries
The first Spanish Penal Code (1822) decriminalized homosexual relations between consenting adults. However, subsequent revisions of the code and public morality laws often recriminalized or stigmatized such behavior. During the Second Spanish Republic (1931–1939), there was a brief period of increased cultural visibility for LGBTQ individuals, particularly within the artistic and intellectual circles of the Generation of '27, which included figures such as Federico García Lorca.
The Francoist Dictatorship (1939–1975)
Under the regime of Francisco Franco, LGBTQ individuals faced systematic state-sponsored repression. In 1954, the "Ley de Vagos y Maleantes" (Vagrancy Act) was amended to include homosexuals, leading to their internment in specialized prisons and agricultural colonies (often described as concentration camps). In 1970, this was replaced by the "Ley sobre Peligrosidad y Rehabilitación Social" (Law on Social Dangerousness and Rehabilitation), which aimed to "cure" or punish homosexuality through imprisonment and psychiatric intervention.
The Transition to Democracy
Following Franco's death in 1975, the Spanish Transition to democracy brought significant changes. Homosexual acts were decriminalized in 1979 through the removal of articles in the Law on Social Dangerousness. The first Pride marches took place in Barcelona (1977) and Madrid (1978). Throughout the 1980s, the cultural movement known as La Movida Madrileña fostered an environment of increased visibility and social acceptance for queer identities.
21st Century Legal Reforms
Spain gained international recognition for its rapid advancement of LGBTQ rights in the early 2000s.
- Same-Sex Marriage (2005): Under the government of José Luis Rodríguez Zapatero, Spain became the third country in the world to legalize same-sex marriage and adoption rights.
- Gender Identity Law (2007): Legislation was passed allowing transgender individuals to change their legal name and gender marker without the requirement of genital surgery.
- Trans Law (2023): The "Ley Trans" was enacted, permitting individuals over the age of 16 to change their legal gender through self-determination (administrative declaration) without a prior medical diagnosis of gender dysphoria.
Today, Spain is statistically cited by various international indices, such as the Eurobarometer and the Pew Research Center, as having one of the highest levels of social acceptance for LGBTQ individuals globally.