Taiwan's parliament has become the first in Asia to legalise same-sex marriage following a vote on Friday.
Hundreds of gay rights supporters gathered outside the Parliament in the capital Taipei to celebrate.
There were tears of joy and people hugging when the result was announced.
A court decided in 2017 that same-sex couples had a legal right to marry.
They told the government they had to make it a law within two years.
Some people in Taiwan didn't want the law to be passed and wanted to keep the definition of marriage as between a man and a woman.
They told the government this in a vote before the bill was passed.
Because of this the government said it would not alter its existing definition of marriage in civil law, and instead would make a special law for same-sex marriage.
The President of The Republic of China (Taiwan) said on social media
'On May 17th, 2019 in #Taiwan, #LoveWon. We took a big step towards true equality, and made Taiwan a better country.'
Netherlands was the first country in the world to legalise same-sex marriage in 2011. Since then a number of countries have done the same.
Same-sex marriage in the UK became legal in 2014, Ireland voted to legalise same-sex marriage in 2015, in the US it was also passed in 2015 and most recently Australia approved it in 2017.