Scotland's first same-sex marriages are set to take place later this year.
The Scottish parliament on Tuesday voted to pass the Marriage and Civil Partnership (Scotland) Bill by a margin of 105-18, with the first unions to be conducted in the autumn.
"I believe this bill will have a hugely positive impact on our society and on the health and well-being of LGBT of people in our country," MSP Jim Eadie said during the debate. "Scotland now has one of the most progressive equal marriage bills in the world. Allowing the option of gender-neutral marriage ceremonies will provide genuine equality for all, including transgender people."
"This is a profound moment in our nation's history," he added.
Politicians cheered as the parliament gave its approval to the bill which had cross-party backing, despite opposition from both the Scottish Catholic Church and the Church of Scotland.