THE SUPREME Court’s decision to overturn a key aspect of the federal Defense of Marriage Act (DOMA) was a watershed moment in the struggle for gay and lesbian equality in this country. Now the federal government faces the complex task of implementing the court’s ruling as quickly as possible.

The justices were clear in their requirements, at least for all “lawful marriages”: Couples in same-sex marriages must be treated the same as their heterosexual counterparts in terms of federal benefits, including inheritance, retirement and, perhaps most important, health care.

What isn’t clear, however, is what happens when lawfully married same-sex couples live in one of what legal scholars have called the 36 “mini-DOMA” states that do not recognize same-sex marriage. As Bloomberg News points out, roughly one-third of the approximately 130,000 married same-sex couples in the United States live in those states. Will they get the benefits they are due?

It shouldn’t be the case that same-sex couples can be first-class citizens in the eyes of the federal government, except in certain states. President Obama has made clear he agrees: “It’s my personal belief,” he told reporters, “that if you marry someone in Massachusetts and you move somewhere else, you’re still married.”

To that end, the federal government has moved quickly and commendably to ensure that benefits extend to all married same-sex couples. Each agency has its regulations, and some define marriage based on where a couple resides rather than where the spouses were married — obviously inhospitable to same-sex couples living in the states that don’t recognize their marriages. The Justice Department has followed the president’s direction and updated rules at several agencies already. The Office of Personnel Management will now offer benefits to any employee or annuitant regardless of where he or she lives.

In other areas, however, it’s a more complicated situation, especially when statutes consider marriage as between a man and a woman or, as is the case at the Internal Revenue Service, in terms of where a couple resides. Through any avenue of attack, these situations are bound to be a headache to update. The Obama administration should continue pressing hard to change them, but in some cases it will be up to Congress. For the sake of clarity and equality, lawmakers must help the administration harmonize standards across the government, recognizing the union of any couple legally married in any state, no matter where they now reside and no matter what piece of the federal government is looking.