Prime Minister Malcolm Turnbull traveled to Government House where Governor-General Peter Cosgrove signed the bill into law on behalf of Queen Elizabeth II, Australia's constitutional head of state.
Cosgrove's signature makes gay marriage legal in Australia from Saturday, when same-sex couples who wed overseas will be recognized as married under Australian law. Couples who intend to marry must give a calendar-month notice, making gay weddings legal on Jan. 9, Turnbull said.
Neville Wills, 98, plans to marry his partner of 39 years, Ian Fenwicke, 74, next month.
Some practical reasons to marry become pressing with age. Relatives have contested wills that left estates to same-sex partners, and gays and lesbians want rights to access and medical consultation when a partner is hospitalized.
"The reason is to have a legal relationship that's not in any way challenged - and, of course, we love each other," Wills said. "We'll get the legal relationship straightened out in January. Call it a wedding if you like, I'm not romantic," he added.
The Attorney-General's Department on Friday published online a new form for couples to announce their intention to marry with tick-box options of male, female and "x."
The form defines "x'' as "indeterminate, intersex or unspecified."
While the previous document referred to a "bride" and "bridegroom," the new form adds the option of "partner."
Turnbull described Parliament voting late Thursday for gay marriage, with only four lawmakers registering their opposition, as a historic moment.
"Containing my emotions to a suitable, prime ministerial level of calm is quite challenging. I am absolutely pumped. I think this is so wonderful," he said after Parliament passed the bill and the public gallery erupted with a standing ovation.
Celebrations continued late into the night in Oxford Street, the center of Sydney's gay nightlife which is in Turnbull's electorate.
Turnbull has been a long-term advocate for marriage equality and is the first prime minister to attend Sydney's renowned annual Gay and Lesbian Mardi Gras, which is also in his electorate.
Hours after Parliament's action, a Sydney municipal council offered free venues to host same-sex marriages.
The Inner West Council is accepting bookings for same-sex marriages in its halls, community centers and parks at no charge over a 100-day period from Jan. 7.
"This is an historic day in the struggle for civil rights in Australia," Mayor Darcy Byrne said.
It follows the downtown Sydney municipality's decision in October to offer free venues for same-sex weddings should they become lawful.
The Australian Capital Territory government, which administers Canberra, the national capital, introduced its own same-sex marriage law in 2013 that was overturned by the High Court within a week.
ACT Attorney General Gordon Ramsay said his government would waive the 55 Australian dollar ($41) cost of wedding certificate for any of the 31 same-sex couples whose short-lived marriages were ruled invalid and want to marry again.
"It's a way of being able to acknowledge the difficulties that some of those couples have been through," Ramsay told Australian Broadcasting Corp.
Anne-Marie Delahunt, who married her partner Meg Clark in Canberra in 2013, said she would take up the government's offer when they marry again in February.
"I think it was a touching measure from the ACT Government to say that our second marriage certificate will be free," Delahunt told ABC.
Gay marriage was endorsed by 62 percent of voters who responded to a national postal ballot by November.
Most gay rights advocates believed the government should have allowed marriages years ago and saw various ideas for a public survey as a delaying tactic. The U.N. Human Rights Committee had called the ballot survey "an unnecessary and divisive public opinion poll."
This story has been corrected to show that four, not five, lawmakers voted "no" and that the date gay marriages will begin is January 9, not January 6.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.