 The Socialist Party ( PSOE ) manifesto for the 2004 general election included the pledge of amending the Civil Code to legalize same @-@ sex marriage , granting it the same status as heterosexual marriage in order to " ensure full social and legal equality for lesbians and gays " . After the socialists ' victory in the election , the new Prime Minister José Luis Rodríguez Zapatero promised at his inauguration address to bring this change forward : " The moment has finally arrived to end once and for all the intolerable discrimination which many Spaniards suffer because of their sexual preferences . ( ... ) As a result , we will modify the Civil Code to recognize their equal right to marriage with the resulting effects over inheritance , labor rights and social security protection " . On 30 June 2004 , the then Minister of Justice Juan Fernando López Aguilar announced that the Congress of Deputies had provisionally approved a government plan for legislation to extend the right of marriage to same @-@ sex couples . López Aguilar also announced two propositions , introduced by the regional Convergence and Union party of Catalonia : one introduced legal status for both <unk> and same @-@ sex common @-@ law unions ( <unk> de hecho , " de facto unions " ) , while the other permitted transgender people to legally change their name and sex designation without the requirement of surgery . The bill regarding same @-@ sex marriage was approved by the Cabinet on 1 October 2004 , submitted to Parliament on 31 December , and passed by the Congress of Deputies on 21 April 2005 . However , it was rejected on 22 June 2005 by the Senate , where the opposition People 's Party held a plurality of the seats . The bill was returned to the lower house , which holds the power to override the Senate , and final approval was given to the bill on 30 June 2005 with 187 " yes " votes , 147 " no " votes , and 4 abstentions . 
