(Yahoo) A federal judge has ordered Wisconsin to pay for the gender reassignment surgery for two transgender Medicaid recipients.

Cody Flack, 30, and Sara Ann Makenzie, 41, filed a lawsuit in April, saying a state rule denying coverage for surgeries to treat gender dysphoria violates the Affordable Care Act and their right to equal protection, the Milwaukee Journal Sentinel reported. The state rule that excludes coverage for undefined “transsexual surgery” was adopted in 1996.