"The High Court... Recognises that a person may be neither male nor female, and so permits the registration of a person's sex as 'non-specific'," it said in a unanimous judgement, dismissing a New South Wales state appeal to recognise only men or women.
The case centred on a person called Norrie - who does not identify as either male or female - who fought a legal battle for a new gender-neutral category.
But the surgery failed to resolve Scottish-born Norrie's ambiguity about their sexual identity, prompting a push for the recognition of a new, non-traditional gender.
The campaigner made global headlines in February 2010 when an application to the NSW Department of Births, Deaths and Marriages accepted that "sex non-specific" could be accepted for Norrie's records.
More From This Section
But soon afterwards the office revoked its decision, saying the certificate was invalid and had been issued in error. At the time, Norrie said the decision felt like being "socially assassinated".
Norrie's lawyers argued in court that the activist was "being forced to live a lie" every time their client filled out a document that listed only two options for gender.
"Norrie's sex remained ambiguous so that it would be to record misinformation in the register to classify her as male or female," the judgment said.
Norrie told AFP last year that most people did not have a problem accepting a non-specific sex category.
"I'm not the first person like this in society, I'm the one that happened to put my hand up for this particular case - I stand on the shoulders of giants."
The Intersex International Australia organisation welcomed the High Court ruling.
"We hope that the media will respect the difference between intersex and transgender identities, and identify Norrie's gender as 'non-specific'," it said.