The former man, identified as "W," had undergone sex-change surgery as well as changing her gender on both identity card and passport.
But the Registrar of Marriages says she is still biologically a male, and therefore not allowed to marry a man.
Counsel for the government Monica Carss-Frisk said the traditional concept of marriage – a union between a man and a woman- has not changed.
And the definition of a man and woman relates to their natural gender and excludes transsexuals, Carss-Frisk said.
She added the Basic Law protects the right to marry, and its scope should be compatible with social values and moral standards.