William Baude / Slate

STANFORD, Calif. — In the wake of the Supreme Court arguments about same-sex marriage, there has been widespread agreement that the justices aren’t likely to create a right to gay marriage throughout the land — thereby invalidating the ban in 41 states that don’t perform it.

And there has also been lots of confusion about what, practically speaking, a ruling that stopped short of legalizing gay marriage in 50 states would mean.

If the Supreme Court leaves the laws of most states intact, but strikes down the part of the Defense of Marriage Act that defines marriage as the union of a man and a woman, will it create “legal chaos” as the federal government tries to figure out which marriages to recognize where? Or is it relatively obvious which couples will receive federal benefits?

The answer is somewhere in between. If the court strikes down DOMA, the federal courts will have to settle serious, hard legal questions about which same-sex couples are married for purposes of federal law.

And that’s to be expected. After all, states have had different marriage laws for centuries, and their definitions can conflict when people marry in one state and live in or move to another. And so states also have longstanding practices for resolving the conflicts created by these differing laws. The questions about gay marriage will up the ante, but the courts will be perfectly capable of dealing with them.

The states and the courts have had to deal with out-of-state gay marriages since Massachusetts first legalized gay marriage in 2004. Some states have decided to recognize same-sex marriages that took place elsewhere. Others refuse, going by the marriage laws of the “place of domicile,” in other words, their own. Many other states are in between. Some recognize same-sex marriages only if that couple wants to divorce. Others have civil unions that grant some basic rights to registered same-sex couples, and give out-of-state same-sex marriages the rights of civil unions.

The result is a patchwork.

Take the real example of two men (known by their initials, H.B. and J.B) who married in Massachusetts in 2006. The couple moved to Texas in 2008, but shortly after the move, they separated and sought a divorce. The Texas courts have refused to recognize their marriage for any purpose — not even to end it. Yet so far as Massachusetts is concerned they are still married, which could affect their shared property if the couple ever moves back.

The new question, if DOMA is struck down, will be which same-sex marriages are recognized for purposes of federal law. Do H.B. and J.B. file their federal taxes jointly, because they are married in Massachusetts, or separately, because they are not married in Texas? What about social security payments, immigration status, or each of the other 1,100 federal laws that deal with marriage?

Even this federal question is not entirely new. As DOMA’s challengers have been reminding us, federal law already looks to state law to determine whether a marriage is valid. This comes up when deciding whether a couple was old enough to be married (states set different age minimums) or whether a marriage between cousins, for example, is valid. Similarly, it comes up when deciding whether somebody has properly divorced a previous spouse, and so can remarry. In all of these cases, federal law looks to state law. Usually, states cooperate with one another and recognize each other’s marriages, which makes the federal questions easy. What is different about same-sex marriage is the intensity of the disagreement.

If DOMA is struck down, federal benefits will be awarded based on a complicated set of regulations and precedents. For most tax purposes, for example, the IRS relies on a couple’s state of residency. Immigration courts often rely on the law of the place where the marriage occurred. Courts often defer to the government’s position on technical questions like this. But sometimes they don’t, and sometimes the government doesn’t have a position. Then courts must work one out on their own. So there will be plenty of litigation, applying and reworking the rules that courts and agencies long ago started to establish. In the end, we won’t have chaos, but the answers won’t be obvious, either.

Congress, meanwhile, could wave a magic wand by enacting a simple, uniform, rule for deciding which state’s marriage law will count for federal purposes. (The Senate and House have previously considered bills that would do just that.) It doesn’t even have to wait for the Supreme Court to rule. That fix would be the best solution of all.