Lawyers for a woman who is claiming that her gender reassignment surgery should be written off for tax purposes as a legitimate medical expense have questioned the credibility of a government witness.

The US Internal Revenue Service contend that such surgery is not “essential” and therefore cannot be tax-free.

Rhiannon O’Donnabhain, a 63-year-old former sailor, is having her case heard in Boston.

She is originally from Ireland, and transitioned six years ago.

She claimed the expense of the operation on her 2001 tax return, but the IRS ruled two years later that it was not valid.

Ms O’Donnabhain paid $25,000 (£12,500) for therapy, hormone treatment and surgery.

The amount of the deduction she is seeking is $5,000.

The IRS contend that such surgery is not “essential” and therefore cannot be claimed against.

She is now suing the service.

The IRS called Dr Park Dietz, who testified yesterday that as there is no “underlying pathological process” of gender identity disorder (GID), it is not a disease.

“There are variations in human nature, and these variations are not diseases,” Dietz said on the stand, according to ABC TV in Boston.

One of Ms O’Donnbhain’s lawyers brought to the court’s attention that Dr Dietz had made up an episode of TV show Law Order and then referred to it when giving expert testimony in a 2002 trial.

Dr Dietz claimed he had made a mistake at that trail, but had not meant to mislead the jury.

Karen Loewy, a lawyer for the Gay and Lesbian Advocates and Defenders who is acting for Ms O’Donnabhain in this legal action, said that there is consensus among doctors that GID is a serious condition.

Trans activists are watching the case closely, as a defeat for the IRS would open the way for thousands of people to avoid paying tax on reassignment surgeries.

Lawyers for Ms O’Donnabhain and the IRS have until November to file briefs with the judge.