A South Dakota state employee is challenging the legality of a provision in the state health plan that bars medical services for gender transformations.

Terri Bruce argues the South Dakota State Employee Health Plan violates the U.S. Constitution’s Equal Protection Clause and the 1964 Civil Rights Act by denying him medically necessary care for gender dysphoria. Bruce, represented by the American Civil Liberties Union and Rapid City lawyer James Leach, is challenging the state in federal court.

Bruce is a transgender man who has worked for the South Dakota State Historical Society Archaeological Research Center since 2005. He was scheduled to receive a mastectomy in June 2016 as a medically necessary treatment for gender dysphoria, according to his lawsuit, but the state health plan denied the treatment. His appeal was denied because the plan bars services or treatments for gender transformations, even if deemed medically necessary by a physician.

That treatment, however, would have been made available to a man who had been assigned that gender at birth, the lawsuit says, meaning the plan discriminates against transgender employees, denying “him a valuable employee benefit that is provided to every other state employee,” the lawsuit says.

“The state of South Dakota’s exclusion of medically necessary care for gender dysphoria is not based on standards of medical care,” the lawsuit claims, “it is based on moral disapproval of, and discomfort with, transgender people and gender transition.”

In 2015, a South Dakota judge declared him legally male and ordered the state to issue him a birth certificate reflecting that he is male.

Bruce’s lawsuit will test whether Title VII of the 1964 Civil Rights Act applies to gender identity, an issue that has sparked debate in both the legal and political arenas. Under the Obama administration, the federal government moved to expand federal civil rights protections to include sexual orientation, although the law didn’t address sexual orientation. The Trump administration has sought to roll back that interpretation.

Earlier this year, the Equal Employment Opportunity Commission ruled the state discriminated against Bruce based on sex.

Tony Venhuizen, the chief of staff to Gov. Dennis Daugaard, declined to comment because the issue is pending.

Bruce is no stranger to the fight over rights for transgender people. The Flandreau native who currently resides in Rapid City was a critic of legislative efforts to require school children to use the bathrooms of the gender they were assigned at birth.

“Transgender people are not asking for special privileges,” he wrote in an opinion column for Argus Leader Media in 2016. “We are simply asking that we be extended the same rights afforded to everyone else.”