The U.S. Tax Court has ruled in favor of a Massachusetts taxpayer whose deduction for her sex change operation was rejected by the Internal Revenue Service.

Rhiannon G. O’Donnabhain, a 65-year-old civil engineer who was born Robert Donovan, sued the IRS after it disallowed the $5,679 medical expense deduction she took on her 2001 taxes for the $21,741 she had spent on hormone therapy, sex reassignment and breast augmentation surgery. The IRS disallowed the deduction, claiming the surgery was merely cosmetic and not surgically necessary.

Judge Joseph Gale allowed the expenses for sex reassignment surgery and hormone therapy, but agreed with the IRS on disallowing the costs of breast augmentation surgery as the hormone therapy had already produced some of the desired characteristics.

O’Donnabhain, who was represented by the Gay & Lesbian Advocates & Defenders, argued that she was afflicted by gender identity disorder, or GID, and the surgery was medically necessary. She had begun secretly wearing women’s clothing at the age of 10, but later joined the Coast Guard, married, and had three children before separating from her spouse in 1992. The IRS claimed that GID is “not a significant psychiatric disorder,” but is instead a “social construction” or “social phenomenon” that has been medicalized.

However, the court rejected this argument. “Respondent’s characterization of the condition on brief as a ‘social construction’ and ‘not a significant psychiatric disorder’ is undermined by both of his own expert witnesses and the medical literature in evidence,” wrote the judge in the ruling. “All three expert witnesses agreed that, absent treatment, GID in genetic males is sometimes associated with autocastration, autopenectomy, and suicide. Respondent’s expert Dr. [Chester] Schmidt asserts that remaining ambiguous about gender identity ‘will tear you apart psychologically.’”

Several of the other judges on the court dissented from the majority opinion, however, “Even if [sex reassignment surgery] is medically indicated for the GID patient — even if SRS is the best that medicine can do for him — it is an otherwise cosmetic procedure that does not ‘treat’ the mental disease,” they wrote. “Sex reassignment surgery is therefore within ‘cosmetic surgery or other similar procedures’ under Section 213(d)(9)(A), and the expense that petitioner incurred for that surgery is not deductible under Section 213(a).”