Both men retired after long careers, and Mr. Schacht became a deacon in his church. But his heart trouble and prostate cancer gave them pause, as did Mr. Frink’s maladies. They prepared a living will, a power of attorney and various other directives. In 2004, they registered as domestic partners, just to make sure there would never be any question in any doctor’s mind about who ought to be in charge if the other one became incapacitated.

The decision to marry, however, had nothing to do with rights or financial benefits. “We wanted to do it for no other reason than to simply be married,” Mr. Schacht said. “We were husband and husband for most of our lives.”

Which is why it was so surprising to him to discover that the federal government didn’t seem to see it that way. Here’s what is supposed to happen, according to several lawyers who have been tracking the changes since the United States Supreme Court issued the Windsor decision last summer: Gays and lesbians who have been married for more than nine months and live in states that recognize their marriages should have no problem with Social Security spousal benefits.

Most experts also expect the same result eventually for couples in civil unions or domestic partnerships in states where they can inherit property from one another without the need for a will. Those states (which include some states that now have legal same-sex marriage) are California, Colorado, Connecticut, Delaware, the District of Columbia, Hawaii, Illinois, Nevada, New Hampshire, New Jersey, Maine, Oregon, Rhode Island, Vermont, Washington and Wisconsin, according to the Human Rights Campaign and Lambda Legal, the gay and lesbian legal services organization.

New York is not among them; hence Mr. Schacht’s predicament.

The Social Security situation gets murkier for people who don’t live in states that recognize their marriages, civil unions or domestic partnerships, though these experts hope that they will be eligible for benefits someday, without having to move.

One possibility seems obvious: Granting benefits to anyone who was in a civil union or filed for domestic partnership, no matter where they lived, as long as they had done so more than nine months before their partner’s death. But it may not be that simple. “If you do that, then you have an arguable injustice to other couples, who will say ‘Gee, we didn’t even have the option of getting a domestic partnership yet we were together for 30 years, and we have all this proof,’ ” said Gary Buseck, the legal director for Gay & Lesbian Advocates & Defenders.

It’s possible that there’s an administrative or legislative solution to this particular inequity, though Brian Moulton, the legal director of the Human Rights Campaign, thinks lawsuits to resolve the situation are more likely. “I think there will be further litigation from couples like the folks you’re talking about, who, but for the discriminatory marriage laws, would have been married and would have been eligible for these benefits,” he said.