The Iowa Supreme Court ruled unanimously Friday that Medicaid must cover gender transition surgeries, reasoning that the procedures are medically necessary.

EerieAnna Good and Carol Ann Beal, transgender women backed by the ACLU, had sued the Iowa Department of Human Services for its policy against funding transition surgeries, calling it discriminatory. The DHS had considered transition surgery to be cosmetic without medical purpose.

Iowa Supreme Court Justice Susan Christensen wrote that the DHS' existing "bar on Medicaid coverage for gender-affirming surgical procedures discriminates against transgender Medicaid recipients in Iowa" under Iowa civil rights laws. In 2007 Iowa legislators added “gender identity” to the Iowa Civil Rights Act.

The Supreme Court's decision was to uphold a lower court ruling to undo the ban, which had been appealed by the state.

Iowa Assistant Attorney General Matthew Gillespie, who represented the DHS, had argued that the ACLU attorneys could not prove that the measure was discriminatory in nature. He said the case was really about whether the state appropriately denied coverage for surgeries meant to treat psychological problems rather than those that are medically necessary.

“I look forward to the day when someone fighting to get the transition-related medical care they need isn’t in the news because they had to go to court to fight for it,” Beal said to the Iowa ACLU . “I want to make it easier for the younger people who need this surgery, so they don’t have to go through the struggles I have had to go through."

Matt Highland, spokesman for the Iowa Department of Human Services, said the agency would not comment on the court’s ruling.