WEDNESDAY SAW a triumph in the continuing struggle for equality in America. A divided Supreme Court rolled back two discriminatory laws, California’s Proposition 8 and a provision of the federal Defense of Marriage Act (DOMA). Though not a total victory for those who believe gay and lesbian couples everywhere should be able to marry, the decisions nonetheless built upon and extended what has been a momentous half year for gay rights.

On Proposition 8, the court ruled on technical grounds, preserving a lower court’s order that struck down the prohibition on same-sex marriage in California. On DOMA, the court invoked the Fifth Amendment to repudiate the part of the law that bars the federal government from recognizing same-sex couples legally joined in states that permit gay marriage.

Writing for the 5-to-4 majority in the DOMA case, Justice Anthony M. Kennedy argued that the federal law’s “avowed purpose and practical effect are to impose a disadvantage, a separate status, and so a stigma upon all who enter into same-sex marriages made lawful by the unquestioned authority of the states.” Congress went out of its way to devalue certain marriages that states had chosen to recognize in their capacity as arbiters of what marriage can be within their own borders. The discrimination’s “unusual character” led the majority to conclude that its “principal purpose” was to “impose inequality” and that it offended the Fifth Amendment’s requirement that all Americans deserve due process of law.

This is not everything same-sex marriage advocates can and should hope for. Ultimately, the Constitution’s guarantee of equal protection should protect gays and lesbians who want to marry in Mississippi as much as in Massachusetts. Justice Kennedy’s findings on DOMA are narrower than that. Though the decision’s strong wording suggests that various forms of anti-gay discrimination could face a tough time in federal courts, it also dwelled on the primacy of the states in setting the terms of marriage. Therefore, Chief Justice John G. Roberts Jr. argued in a dissent, the majority’s holding cannot later be construed to invalidate state bans on same-sex marriage. In a separate dissent, Justice Antonin Scalia disagreed with what he (as an opponent of same-sex marriage) saw as the chief justice’s too-sanguine view.

The court’s ambiguous signal is understandable, for now, in a sharply divided nation. It heads off a popular backlash that a more dramatic ruling might have precipitated, giving more time for all areas of the country to accept same-sex marriage. The movement toward acceptance has proceeded at a breathtaking pace in recent years. Between now and the point at which the justices rule more forcefully, same-sex marriage advocates must look beyond the courts for action and toward democratic legitimacy. If Californians voted again on same-sex marriage, polls show that what was a close call in 2008 would be an easy win today. The court’s rulings Wednesday were welcome, but in essence they only affirmed how quickly the nation has moved away from prejudice and toward essential respect for all Americans.