Utah responded that it would not be swayed by “politically correct trade associations,” referring to, among others, the American Academy of Pediatrics, the American Medical Association and the American Psychiatric Association. “We are not ruled by experts,” the state’s brief said.

As with the argument about responsible procreation, it is possible to accept the state’s position that it is best for children to be raised by their biological parents and yet wonder how that would be more likely to happen by denying gay and lesbian couples the right to marry. Utah argued that the two things are linked.

“By holding up and encouraging man-woman unions as the ‘preferred’ arrangement in which to raise children,” the state said, “the state can increase the likelihood that any given child will in fact be raised in such an arrangement.”

Judge Shelby had rejected the argument as illogical and counterproductive. Utah’s ban, he wrote, “does not make it any more likely that children will be raised by opposite-sex couples.” But it certainly demeans and humiliates the thousands of children being raised by same-sex couples in the state, he said.

In the Supreme Court, Utah refined its argument.

“The state does not contend that the individual parents in same-sex couples are somehow ‘inferior’ as parents to the individual parents who are involved in married, mother-father parenting,” the state said.

But, drawing on Supreme Court decisions endorsing the value of diversity in deciding who may attend public universities, the state now said it was pursuing “gender diversity” in marriages. “Society has long recognized that diversity in education brings a host of benefits to students,” the brief said. “If that is true in education, why not in parenting?” The Supreme Court did not take a position on Utah’s several shifting arguments, saying only that it would stay Judge Shelby’s decision while an appeals court considers the case. That will happen over the next couple of months, and the state’s position may evolve further.

Or perhaps it will return to the candor of Stanford E. Purser, a lawyer with the state attorney general’s office. Judge Shelby asked him on Dec. 4 whether letting same-sex couples marry was of “any relevance at all” to the state’s interests in encouraging opposite-sex couples to marry.

“It may end up that there is no difference,” Mr. Purser said. “It may end up that there is. We just simply don’t know.”