The bill proposed by the Socialist government was backed by other left wing parties and rejected by the centre-right opposition. The law gives gay marriages the same rights as heterosexual marriages, including those on taxes, inheritance and housing, but does not grant them the right to adopt children. The legislation has prompted few protests. Homosexuality was illegal as late as 1982 in Portugal, a predominantly Catholic country. In neighbouring Spain hundreds of thousands of people demonstrated against same-sex marriage in 2005.

It’s possible the law will come into force in April, a month before a visit by Pope Benedict XV, who strongly opposes the move. Same-sex marriage is already legal in five other European countries: the Netherlands, Belgium, Spain, Sweden and Norway.