Alexander Ho / TIME

Related IRS Fight Against Sex Change Deduction Was Stupid Forbes

The Internal Revenue Service isn’t going to fight people any longer who want to deduct the cost of gender reassignment surgery from their taxes.

According to a so-called acquiescence filed earlier this month, IRS officials notified the Tax Court that it would abide by a 2010 decision that held that some medical expenses from such surgeries could be deducted. It also ends the nearly decade-long battle that Rhiannon O’Donnabhain, who was born male and fathered three children, waged against the IRS to deduct $5,000 in expenses she incurred to bring her anatomy in line with her gender identity. The IRS at first denied her request claiming the procedure was entirely cosmetic.

(MORE: Is This the Beginning of the End for the Dollar Bill)

O’Donnabhain’s victory highlights the struggle that people with Gender Identification Disorders face as they undergo the long, painful and potentially costly treatment to contour the bodies that they were born with into what they think they ought to be. Each year more than 1,000 people undergo the surgery, which costs tens of thousands of dollars and often isn’t covered by insurance, according to the Gay and Lesbian Medical Association.

“There is something to be said when a federal court recognizes general identity disorder as a serious medical condition,” says Karen Loewy, an attorney with Gay & Lesbian Advocates & Defenders, the non-profit that represented O’Donnabhain, in an interview. The IRS is saying that it’s going to do what the Tax Court tells them to do, Loewy says.

The case was not a complete victory for O’Donnabhain. Her request to deduct expenses for her breast augmentation were not allowed because it was directed at improving her appearance and not to treat disease as construed by the tax code.

Anthony Infanti, a University of Pittsburgh law professor who followed the case, tells TIME Moneyland that the court didn’t explicitly rule that out for future cases. “It was more fact-specific to that situation,” he says.

The Tax Court’s panel of judges could hardly be accused of bending over backwards to accommodate O’Donnabhain. Even in his concurring opinion, Tax Court Judge Mark V. Holmes lamented that making gender identity disorder a tax-deductible medical expense drafts “our court into culture wars in which tax lawyers have heretofore claimed noncombatant status.”

And some of the court’s language disturbed Infanti. “It clearly showed how political tax law can be,” he said. “Some of the dissenting opinions were clearly hostile to the taxpayer.”

(MORE: Warren Buffett is Buying. Is it Time to Celebrate?)

O’Donnabhain told the Tax Court that she first remembered being uncomfortable with her male gender at the age of 10. As her discomfort grew in adolescence, she secretly dressed in women’s clothing. O’Donnabhain later married but got divorced in 1996. She had the surgery in 2002 and was audited by the IRS in 2003. The case wound its way through IRS bureaucracy until 2006 when the lawsuit was filed.

Since the legal battle started, O’Donnabhain, who is retired, has moved on with her life and recently celebrated the wedding of one of her children. The IRS decision gave O’Donnabhain a “sense of closure,” Lowey said.

“From the beginning it was not about the money,” she said. “She just wanted fair and equitable treatment.”