Australia's government has passed a law to make same-sex marriage legal, with only four politicians voting against it.
It comes after 61% of the Australian public - more than 12 million people - voted in support of same-sex marriage last month.
MPs cheered and clapped as the law was passed, following hours of debate and speeches in the Australian parliament.
Following the vote, Prime Minister Malcolm Turnbull said: "What a day for love, for equality, for respect."
"Australia has done it."
Emotional MPs hugged each other before supporters in the public gallery began singing "I am, you are, we are Australian".
Many supporters of same-sex marriage also gathered on the lawn outside parliament.
Australia's governor-general is expected to approve the bill in the coming days, which will make it officially the law.
But the countries first same-sex weddings will not take place until at least January.
That's because of a rule for all Australian couples that they have to give a full month's notice of their plan to get married.
More than 100 MPs had spoken in the Australian parliament on the topic, with many senators and MPs telling personal stories to explain why they supported the bill.
One MP, Tim Wilson, even ended his speech with a marriage proposal to his partner.
There were some people in Australia who didn't want the law to be passed.
Others wanted special protections for religious groups, but politicians voted not to support this.
Under the new laws, ministers of religion and people who carry out marriages will be able to act in accordance with their beliefs about whether or not they conduct ceremonies.
Religious bodies will also be able to follow with their practices and beliefs in providing facilities, goods and services in connection with marriage.