WASHINGTON — In a telling moment at Tuesday’s Supreme Court arguments over same-sex marriage, Chief Justice John G. Roberts Jr. suggested that he may have found a way to cast a vote in favor of the gay and lesbian couples in the case.

“I’m not sure it’s necessary to get into sexual orientation to resolve this case,” he said. “I mean, if Sue loves Joe and Tom loves Joe, Sue can marry him and Tom can’t. And the difference is based upon their different sex. Why isn’t that a straightforward question of sexual discrimination?”

That theory had gotten only slight attention in scores of lawsuits challenging bans on same-sex marriage, and it is unlikely to serve as the central rationale if a majority of the court votes to strike down such bans, an opinion likely to be written by Justice Anthony M. Kennedy.