WASHINGTON (AP) — Late in the oral argument over same-sex marriage in California, Justice Anthony Kennedy made a startling comment, given the months of buildup and mountain of legal briefs that have descended on the justices.

“You might address why you think we should take and decide this case,” Kennedy said to lawyer Charles Cooper, representing opponents of same-sex marriage.

One might have thought the court had already crossed that bridge.

But now the justices were openly discussing essentially walking away from the case over California’s Proposition 8, a voter-approved ban on gay marriage, without deciding anything at all about such unions.

Indeed, this case offers a rare glimpse at the court’s opaque internal workings, in which justices make cold political calculations about what to do and Kennedy’s often-decisive vote can never be far from his colleagues’ minds.

The court on Wednesday concluded two days of arguments involving gay marriage. In the second case, a constitutional challenge to a portion of the federal Defense of Marriage Act, a majority of the court appeared likely to rule that legally married gay couples should be able to receive a range of benefits that the law currently reserves for straight married couples.

The decision to hear the DOMA case was easy. The Supreme Court almost always has the final word when lower courts strike down a federal law, as they did in this case.

Proposition 8’s route to the Supreme Court was not as obvious. The appeals court ruling under review by the justices seems to have been written to discourage the high court from ever taking up the case because it applies only to California and limited a much broader opinion that had emerged earlier from the trial court.

And yet in December, the court decided it would hear the case. It takes a majority of five to decide a case a particular way, but just four justices can vote to add a case to the calendar. And the court does not disclose how the justices vote at this stage.