Denmark has become the latest country to approve same-sex marriage.
The law was passed with an overwhelming majority in parliament, and also covers weddings in the Church of Denmark.
Denmark was the first country in the world to recognise civil partnerships for same-sex couples in 1989.
However, no further steps were taken under the previous centre-right government, while other countries have passed laws extending marriage to same-sex couples.
The bill put forward by Denmark's centre-left government was passed in an 85-24 vote on Thursday.
"This is equality between couples of the same gender and couples of different genders. A major step forward," Danish Minister for Ecclesiastical Affairs Manu Sareen said after the vote.
The legislation takes effect on 15 June.