Same sex marriages were legal for a very brief time in Australia around 2013, but a High Court ruling that very year made it impossible for LGBTQ couples to marry legally in the country.
While the Dean Smith bill already allows priests and other religious celebrants to refuse to Wednesday same-sex couples on the basis of their faith, a number of senators wanted the protection extended to civil celebrants with a "conscientious objection".
The bill must now proceed to the House of Representatives.
All proposed amendments, excluding technical tweaks, were voted down with moderate coalition MPs voting with Labor and the Greens to defeat the bulk of attempts by their conservative colleagues to change the bill. The outcome was met by cheers and applause in the senate, with politicians who supported the legislation rising to their feet to embrace and congratulate one another.
Australia got closer to legalising marriage equality. "I certainly am", Senator Smith said in a final speech before the vote.
There are several possible routes for law change in Australian parliamentary law - but both chambers, the House of Representatives and the Senate, must agree to an identical form.More news: WhatsApp may add some new features in the app for iOS
More news: Trump says Access Hollywood tape wasn't him
More news: Melania Trump's Christmas decorations include hallway with 'super creepy funeral' vibe
At a joint press conference after yesterday's outcome was announced, Labor Senate leader Penny Wong described the passing of the bill as a day of celebration for many Australians. "Your love is not lesser, and nor are you", she added. "Essentially we are seeking a "no detriment" clause so that no one who holds a belief in traditional marriage is penalized for their belief at work or in the wider society".
"I think the failure to fully protect celebrants who have a conscientious or may have a conscientious or non-religious objection to solemnising a same-sex marriage is a missed opportunity for our parliament to unify", he said.
Senators from various parties hugged each other and cried following the vote, with some declaring it the proudest day in their parliamentary careers.
Senators were overcome with emotion on Wednesday as the bill sailed through the upper house.
One Nation leader Pauline Hanson abstained from the final vote, as did Liberal James McGrath and Nationals Bridget McKenzie.
Following the results, Australian Prime Minister Malcolm Turnbull vowed to move a bill in favour of equality by Christmas.