In 2014 the Scottish parliament passed a similar bill.
Northern Ireland has not passed same-sex marriage legislation.
New Zealand became the first country in the Asia Pacific to legalise same-sex marriage when parliament comfortably passed the law in 2013. France legalised same-sex marriage and same-sex adoption in 2013, a move which attracted hundreds of thousands of protesters and counter-protesters.
Uruguay decisively passed same-sex marriage legislation in 2013. Brazil became the first country to legalise same-sex marriage not through legislation, but with a court ruling.
In 2016 parliament overturned a presidential veto and granted same-sex couples the right to adopt.