WASHINGTON — The Supreme Court on Tuesday was deeply divided over one of the great civil rights issues of the age, same-sex marriage. But Justice Anthony M. Kennedy, whose vote is probably crucial, gave gay rights advocates reasons for optimism based on the tone and substance of his questions.

In two and a half hours of arguments over whether the Constitution guarantees same-sex couples the right to marry, Justice Kennedy sent conflicting signals. At some points, he seemed wary of moving too fast and torn about what to do. But his demeanor was more emotional and emphatic when he made the case that same-sex couples should be permitted to marry. He is also the author of three landmark opinions expanding the rights of gay Americans.

The other justices for the most part played to type, clashing over what they saw as the right answer in the case and also over how to reach it. The questioning illuminated their conflicting views on history, tradition, biology, constitutional interpretation, the democratic process and the role of the courts in prodding social change.

That left the courtroom focused on Justice Kennedy. He said he was concerned about changing a conception of marriage that has persisted for thousands of years based on little more than a decade of experience with same-sex marriage in the United States.