LAST THURSDAY, people started spending nights in the ticket line outside the Supreme Court, and we can’t blame them.

Over the next two days, the justices will consider two of the weightiest civil rights cases in years, both about the continuing struggle of gay men and lesbians to obtain equal recognition under the law. On Tuesday, the court will consider the constitutionality of Proposition 8, a California initiative that banned same-sex marriage in the state. On Wednesday, the justices will turn to the Defense of Marriage Act (DOMA), a law enacted in 1996 that bars the federal government from offering benefits to same-sex couples, even if they were legally married in their home state.

The justices have many options as they consider how to rule. But more important than the particulars of their eventual holdings is the general direction they choose to take: They must move the country forward, not back.

It is possible but unlikely that the court will hand down ringing decisions proclaiming marriage and all its benefits to be a constitutional guarantee, available to same-sex couples in every state. We believe in this outcome as a matter of moral and legal principle, and we expect it will prevail, eventually. But we also expect it will take more time for courts — and society at large — to embrace it fully.

It is also possible that the justices will uphold Proposition 8, DOMA’s noxious provisions or both. They must not choose this direction. Although many Americans’ attitudes on these matters are far from simple — we would hardly accuse President Obama of rank bigotry for opposing same-sex marriage only a couple of years ago — denying gay men and lesbians the right to marry is unjustifiable discrimination, and denying federal benefits to duly married couples is even more obviously repugnant to the notion of equal protection.

The arguments of those defending discrimination against gay couples are beyond far-fetched. Proposition 8’s advocates, for example, contend that restricting marriage to heterosexual couples must be rational because for thousands of years people widely agreed that the institution involved only the union of a man and a woman. That reasoning stinks of the faulty logic used to justify the persistence of all sorts of discrimination. They also argue that marriage’s purpose is to ensure that children are born into stable families; therefore, California should be allowed to limit marriage to only those capable of biological procreation. That is a narrow and insulting view of marriage. Would it then be constitutional to deny sterile heterosexual couples the right to marry? How about older couples? Moreover, lesbians can bear children and gay men can adopt. Why wouldn’t society want their parents to be wed, too?

A much more reasonable outcome than that would have the court point forward cautiously. Neither Proposition 8 nor DOMA’s worst provisions should survive the court’s review. But the justices can be expected to stop short of ruling so broadly that they would require every state to recognize same-sex marriage, when four-fifths of the states currently do not.

The court could knock down Proposition 8 in a manner that would restore same-sex marriage in California without affecting any other state, perhaps on procedural grounds. The Obama administration, meanwhile, has offered the justices another way to repudiate the proposition while limiting the impact of a ruling. Solicitor General Donald B. Verrilli Jr. argues that states that already offer same-sex couples all the benefits of marriage, as California does through domestic partnerships, cannot have any good reason to deny those couples the title. Ruling along those lines would have a broader impact than would a decision based on a technicality — California’s marriage ban would go, as would those of seven other states. That verdict, though, might also discourage states from offering same-sex couples partnership rights, for fear that a court would then force them to marry gay and lesbian couples.

On DOMA, the justices could use procedural grounds to strike down the statute. The high court could alternatively rule on the substance of the constitutional claims yet keep its decision narrow. In so doing, the justices would join two circuit courts that have offered legal reasoning to excise DOMA’s most objectionable bits from the federal code without writing much broader precedent into the judicial canon.

The progressive but incremental approach that these circuit courts, the Obama Justice Department, prominent attorneys and many others who would uphold gay rights have adopted represents an important phase in the evolution of legal thought on same-sex marriage. It cannot be satisfying to those of us who see a strong equal-protection case for same-sex equality. But, given concerns that a sweeping judicial mandate might cause a counterproductive backlash, it is understandable.

Gay-rights advocates are winning the argument. American society is changing faster than anyone could have thought possible only a decade ago. Nine states and the District now allow same-sex marriage. Voters in three of those states, including Maryland, affirmed their support for such nuptials last year. Opinion polling shows that a majority of Americans supports extending marriage rights to gay men and lesbians. Among young Americans, who grew up in an era in which friends and relatives could more easily come out of the closet and be themselves, there is hardly a debate. Now, it seems not only possible but also likely that same-sex marriage will be legal, widespread and, frankly, mundane and that this will happen relatively soon. The Supreme Court must play a part in this civil rights triumph — and justices should not shrink from it.