ST. PAUL, Minn. (AP) — Transgender rights advocates are encouraged by a ruling from a judge who says Minnesota's refusal to cover transitional surgeries is unconstitutional.

Minnesota Public Radio reports state lawmakers enacted the ban in 2005, selling it as a cost-saving measure. It only applied to people receiving state Medical Assistance and MinnesotaCare benefits.

Ramsey County Judge William Leary III said this week that the ban violated the right to privacy and interferes with medical decisions transgender people make regarding their bodies.

Sixty-four-year-old Evan Thomas, a St. Paul resident, was one of the plaintiffs in the case. Thomas sought surgery as an enrollee in Medical Assistance, the state Medicaid program, but was denied coverage for a bilateral mastectomy.

The Minnesota Department of Human Services has agreed to pay for Thomas' surgery as a part of the lawsuit's resolution.