Attorney-General George Brandis, the government's Senate leader, said the legislation would "demolish the last significant bastion of legal discrimination" over sexuality in Australia.