 During the 1990s and early 2000s , several city councils and autonomous communities had opened registers for civil unions that allowed benefits for unmarried couples of any sex , although the effect was mainly symbolic . Registries were created in 16 out of 17 of Spain 's autonomous communities ; Catalonia ( 1998 ) , Aragon ( 1999 ) , Navarre ( 2000 ) , Castile @-@ La Mancha ( 2000 ) , Valencia ( 2001 ) , Balearic Islands ( 2001 ) , Madrid ( 2001 ) , Asturias ( 2002 ) , Andalusia ( 2002 ) , Castile and León ( 2002 ) , Extremadura ( 2003 ) , Basque Country ( 2003 ) , Canary Islands ( 2003 ) , Cantabria ( 2005 ) , Galicia ( 2008 ) and La Rioja ( 2010 ) , and in both autonomous cities ; Ceuta ( 1998 ) and Melilla ( 2008 ) Spanish law already allowed single people to adopt children ; thus , a same @-@ sex couple could undertake a de facto adoption , but the partner who was not the legal parent had no rights if the relationship ended or the legal parent died . Same @-@ sex marriages were not legal in the autonomous communities , because the Spanish Constitution gives the State sole power to legislate marriage . 
