They notified their homeowners association that they’d be putting their house in Shrewsbury, Mo., on the market and canceled a vacation because they’d be moving in 90 days. Ms. Walsh contacted a realtor and began packing.

Then came a call from the residence director, asking Ms. Walsh the nature of her relationship with Ms. Nance, 68, a retired professor.

Natives of the area, they’d been partners for nearly 40 years. Before the Supreme Court legalized same-sex marriages across the country, they’d had a harborside wedding in Provincetown, Mass.

“I said, ‘We’ve been married since 2009,’” Ms. Walsh replied. “She said, ‘I’m going to need to call you back.’”

Last month, the women brought suit in federal court, alleging sex discrimination in violation of the federal Fair Housing Act and the Missouri Human Rights Act.

In turning down their application, Friendship Village had mailed a copy of its cohabitation policy, which limits shared units to siblings, parents and children, or spouses.

“The term ‘marriage’ as used in this policy means the union of one man and one woman, as marriage is understood in the Bible,” the policy noted.