JUNEAU, Alaska (AP) — An Alaska health care plan that has excluded coverage of gender-confirming surgery for transgender employees is discriminatory, a federal judge ruled Friday.

The decision came in a 2018 case filed against the state by Jennifer Fletcher, a legislative librarian who said she was forced to pay thousands of dollars in out-of-pocket costs for medically necessary transition-related care not covered by her insurance plan.

Her attorneys, in legal documents, said a blanket exclusion of coverage for gender-confirming surgery violates a prohibition on sex discrimination. They said terms of the plan were set by the state and that the exclusion dated back decades.

U.S. District Court Judge H. Russel Holland, in his decision, said if a procedure, such as a vaginoplasty, was medically necessary to correct a congenital defect, coverage would have been available under the AlaskaCare plan. But he said the plan denies coverage for the same surgery in cases involving transgender women.

He said Fletcher was treated differently in terms of health coverage because of her sex.

Maria Bahr, a state Department of Law spokeswoman, said the department is reviewing the decision and had no immediate comment.

Tara Borelli, an attorney for Lambda Legal who helped represent Fletcher, said the state could appeal Holland's decision. The state also could seek to settle the question of damages and end the case, or fight that issue, she said.

"Transgender employees should never be forced to endure what Jennifer endured, to be denied potentially life-saving treatment simply because of who they are,” Borelli said in a statement.

Her attorneys said Fletcher was diagnosed with gender dysphoria and that surgical treatment was medically necessary. Fletcher said people should be able to rely on employers to treat workers equally, especially when it comes to health care.

“It was stigmatizing and traumatic to have my colleagues receive coverage for their medical needs while I was denied,” Fletcher said in a statement. “I am grateful that the court saw that treatment for what it was — unlawful discrimination — and I hope that this ruling means that no one else will have to go through being targeted for discrimination by their employer."