A Missouri lesbian couple was told they couldn’t buy a unit in a retirement community because they’re married. The women sued, alleging discrimination. They just lost.

Mary Walsh, 72, and Beverly Nance, 68, have been together for 40 years and married for ten.

In 2016, they visited and wanted to move into the Friendship Village Sunset Hills community, an independent living retirement community near St. Louis. They were qualified tenants and they even put down a $2,000 deposit.

Within a week of putting down the deposit, a representative of Friendship Village called to ask what their relationship was. When Walsh told her that they were married, the representative said that they couldn’t move into Friendship Village because it has a policy that “defined marriage as between a man and a woman” and as “marriage is understood in the Bible.”

So the women sued in federal court claiming that the Fair Housing Act (FHA) had been violated. The FHA bans discrimination on the basis of “race, color, religion, sex, familial status, or national origin.”

Related: Affordable housing for LGBT seniors opens in heart of downtown Philadelphia

“Mary and Bev were denied housing for one reason and one reason only – because they were married to each other rather than to men. This is exactly the type of sex discrimination the Fair Housing Act prohibits,” said National Center for Lesbian Rights (NCLR) Senior Staff Attorney Julie Wilensky.

U.S. District Judge Jean Hamilton didn’t see it that way and dismissed their case this week.

“The Court finds the claims boil down to those of discrimination based on sexual orientation rather than sex alone,” she wrote.

“We are disappointed by the court’s decision,” Walsh said in a statement. “Bev and I are considering our next steps, and will discuss this with our attorneys.”

The state of Missouri doesn’t ban discrimination on the basis of sexual orientation or gender identity.