The Senate has passed a bill for same-sex marriage in a historic 43-12 vote.
The vote came two weeks after 61.6% of eligible Australians had voted "yes" in a national survey on the issue.
The 17 senators who weren't in the chamber for the vote were either absent from parliament, abstaining, or had been granted a "pair".
The bill will now proceed to the House of Representatives, where it will face more debate and possible amendments before coming to a vote.
Here's a list of all the politicians who voted against or abstained, and the reasons they gave for their vote.
NSW Liberal senator Concetta Fierravanti-Wells, minister for international development and the Pacific, voted no.
She said she wanted to represent the almost five million Australians who, like her, voted "no", including culturally diverse sections of Australia who are against same-sex marriage.
"We must ensure the inclusion of substantial religious protections for all Australians of faith in this bill," she said. "The 52% of the Australian voting public who either voted 'no' or did not vote deserve consideration. They deserve respect and they deserve inclusion of their fundamental principles and beliefs before passage of this bill."
NSW returned a 57.7% "yes" result in the marriage survey.
Queensland National senator Matt Canavan, minister for resources and northern Australia, voted "no".
Canavan said he would have voted for the bill if amendments extended religious protections and allowed civil celebrants the right to refuse to marry gay couples.
"If you believe that this is an area that deserves some degree of thought and protection, then it should be extended to all — those in the future as well as those in the past," he said.
"It should be extended to those of a religious viewpoint and those of a non-religious viewpoint. That's why these amendments are a more elegant and consistent way to handle this issue and to provide a conscientious objection to all celebrants and to all Australians who want to participate in marriage, but who also want to do so in a way consistent with their conscientious views."
Queensland returned a 60.7% "yes" result in the marriage survey.
Tasmanian Liberal senator Eric Abetz voted "no".
Abetz was one of the faces of the "no" campaign and said that despite a majority of the population voting in favour of changing the law, he remained opposed.
He said Australians had voted to extend marriage to include same-sex couples, but that many "yes" voting Australians felt "betrayed" at the prospect of wording that includes all intersex or gender-diverse people, some of whom have an "X" marker on their passports.
Abetz told the Senate that the 38.4% of people who voted "no" is "three-to-four times the Greens' vote", and also noted that "the latest opinion poll doesn't determine one's morality, principles, or policy".
"The media and celebrities were relentless, yet the 'no' campaigners held their course," he said. "They had to go to work passing 'yes' propaganda in their very own offices, or physically work under the so-called rainbow flag."
Tasmania returned a 63.6% "yes" result in the marriage survey.
WA Liberal senator Slade Brockman voted "no".
Brockman did not speak during the debate but has previously said he would be voting "no" regardless of the survey outcome.
WA returned a 63.7% "yes" result in the marriage survey.
Queensland National senator Barry O'Sullivan voted "no".
The Queensland senator said he would be happy if he could "go all the way to Christmas without hearing the word 'marriage' again".
He said he was voting "no" because he was worried about school education.
"Parents must always have the right to choose what teachings their children will be exposed to and what exercises they engage in," he said.
"If they fundamentally do not believe in teachings or modules of education that their children are to be exposed to, then they must have the right to insulate their children from those. That is their choice. That is the primal right of parents who are taking care of children who haven't reached the age of majority. It's as simple as that.
"I don't necessarily want to be one of the people who tie Safe Schools to this debate, but there you go: Safe Schools, a most horrible module of education."
NSW Nationals senator John "Wacka" Williams voted "no".
"I'm a 'no' voter," Williams said. "There is no secret about that."
"I have made the point clear for many, many years that I believe marriage is a Christian sacrament, the sacrament of matrimony, between a man and a woman —not that I will be following in the footsteps of Mary MacKillop."
Tasmanian Labor senator Helen Polley voted "no".
Polley, the shadow minister for ageing, has previously complained that she was being bullied for maintaining her opposition to same-sex marriage during the survey.
During the debate, Polley said she was in favour of wide-ranging exemptions based on religious and conscientious belief. She stressed that the challenge senators face is ensuring that "the almost five million people who voted 'no' are not marginalised".
Citing several talking points about the overseas experience used by the "no" campaign, Polley said: "We must ensure that we balance the rights, rather than exceptions, for religious freedom."
Queensland Labor senator Chris Ketter voted "no".
Ketter said he was voting "no" for personal and religious reasons.
"In my home state of Queensland, roughly 60% of those who participated in the postal survey support a change to the law," he said. "I am one of the 40%.
"I cannot support a change to the definition of marriage. My reasons are very personal and are informed by my faith. They go to the fact that the family is the fundamental group unit in society and to the uniqueness of the relationship between men and women."
NSW One Nation senator Brian Burston voted "no".
Burston said he was voting "no" because Australia is a Christian commonwealth.
"There is absolutely no justification for homosexual marriage in any human rights instrument," he said. "It is a legal fancy designed by the decadent West, with no foundation in nature or human culture."
Burston said he was "deprived" of a say on same-sex marriage because his survey form didn't arrive in the mail, but that he would have registered a "no".
Queensland One Nation senator Fraser Anning voted "no".
Anning said he was voting "no" to reflect the views of One Nation supporters in Queensland.
"If you look at the highest areas of the 'no' vote against same-sex marriage, they are in the areas where the One Nation vote was strongest — rural and regional Queensland," he said.
"This clear indication of the views of what I consider to be my constituency is reinforced by the many thousands of conversations I've had over the years, both campaigning with Pauline for 20 years and as a publican. They have given me a clear view of rural and regional Queenslanders' views on same-sex marriage. It is my intention to reflect those views."
South Australian senator for the Australian Conservatives, Cory Bernardi, voted "no".
Bernardi said he is concerned about freedom of speech being curtailed and what children will be taught in schools.
"I also express the concern of many parents," he said.
"It is not perhaps a place directly for the federal parliament, because education is a state-based issue, and that's a principle of federation. But I do think there are things going on within our education system that parents feel uncomfortable about and feel are somewhat out of their control.
"Give some accommodation or consideration to the rights of parents — if they conscientiously object, whether for religious reasons or other reasons — to say, without making a fuss about it: 'I'd rather my child not be exposed to some of these teachings', or to have some input into it. I think that would be a positive step forward."
SA returned a 62.5% "yes" result in the marriage survey.
SA independent senator Lucy Gichuhi voted no.
Gichuhi did not give a speech during the same-sex marriage debate, but had said previously she would vote according to the result of the survey. She did not.
At least seven senators abstained from the vote.
WA Liberal senator and employment minister Michaelia Cash abstained from the vote.
Cash did not give a speech during the debate but previously stated her opposition to same-sex marriage.
She told the ABC she would respect the will of the Australian people whatever they decide.
Cash said any Liberal MP that didn't agree with the survey result and could not support it "in good conscience" would have to publicly say why.
"They will need to explain that to the Australian people," she said.
Victorian Nationals senator Bridget McKenzie abstained, but sat on the side of the chamber to watch the vote.
McKenzie did not speak during the same-sex marriage debate but has previously said she would be voting against the bill no matter what the result of the survey was.
Queensland Liberal senator and assistant minister to the prime minister James McGrath also abstained and sat alongside McKenzie.
McGrath did not speak during the debate.
ACT Liberal senator Zed Seselja returned a "no" ballot in the postal survey but abstained from the Senate vote.
Seselja said he is against same-sex marriage because he believes there is a place for preserving the "unique nature of marriage between a man and a woman as the ideal situation to raise children".
"There is a uniqueness to the male-female relationship that as of today is still expressed in Australian law," he said.
"It soon won't be as a result of this survey. In the end, I disagree with that. I voted 'no' in the survey, but at the outset I said I would respect the will of the Australian people. If we are going to go to the trouble of asking them what their view is on this very important issue, we need to respect it."
Seselja said that after same-sex marriage was legalised in the UK a Jewish school failed three inspections by the education authority because it refused to teach its students a "Safe Schools-type of curriculum". He speculated that could be a possibility in Australia.
The ACT returned a 74% "yes" result in the marriage survey, the highest in the country.
Queensland One Nation senator Pauline Hanson said she had planned to vote "no", but abstained.
During her speech Hanson linked same-sex marriage to polygamy.
"My concern is that, in time to come, the parliament and its members could at any time change this (definition) to include multiple marriages or marriages of people under a certain age," she said.
"I don't believe we are fully aware of the ramifications this is going to have on our society."
Fellow WA One Nation senator Peter Georgiou was also absent from the chamber during the vote, but it is not known if he was purposely abstaining.
Victorian Labor senator Jacinta Collins also returned a "no" answer in the marriage survey, but abstained from the vote in the parliament.
Collins effectively abstained by pairing her "no" vote with "yes" supporter Victorian Labor senator Gavin Marshall, who is on secondment to the United Nations.
Collins didn't think there were enough religious protections in the bill.
"Labor senators have a conscience vote with respect to the issue of same-sex marriage, whether it’s the vote at the end of the bill, or whether it is related to same-sex marriage in the amendments,” Collins said.
Liberal senator David Fawcett, and Labor senators Sam Dastyari, Pat Dodson, Don Farrell, Alec Gallacher, Katy Gallagher, Deborah O'Neill and Glenn Sterle were also absent during the vote.
A number of Labor senators were absent from parliament, as they were attending the Blue Mountains funeral of former Labor senator Steve Hutchins.
Gallagher was at Westmead Children's hospital in Sydney as one of her children was having major surgery.
Liberal senator Arthur Sinodinos is on medical leave.
Alice Workman is a political reporter for BuzzFeed News and is based in Canberra.
Contact Alice Workman at firstname.lastname@example.org.
Got a confidential tip? Submit it here.