Seventeen years ago, when Hawaii seemed on the verge of permitting gay couples to wed, Congress hustled to pass — and Bill Clinton signed — the Defense of Marriage Act. No one doubted the strong emotions in play, or the political posturing, the chance to stand with “traditional values.” On Wednesday, the U.S. Supreme Court overturned a key component of the law, rejecting the notion that the federal government could withhold benefits from gay couples in states where same-sex marriage is legal.

Know that the 5-4 majority did not overturn laws in Ohio and 36 other states banning gay marriage. Neither did the court say there is a constitutional right for same-sex couples to marry. All that said, this is a landmark decision for civil rights, the concept of gay marriage advancing dramatically, reflecting in no small way the altered political landscape. Much has changed since 1996, the court hustling in this instance to catch up.

The case before the court concerned two New York City women, married in Canada in 2007. When one died two years later, the other inherited her property. The surviving spouse soon faced a hefty tax bill that would not have applied in a heterosexual marriage. Writing for the majority, Justice Anthony Kennedy rightly cited the injustice at work, a “deprivation of the equal liberty of persons,” of equal protection of the law.

Kennedy reasoned how the Defense of Marriage Act created “two contradictory marriage regimes.” The thinking and practice long have held that marriage is the business of states. Thus, when a state embraces gay marriage, as 13 now have, the federal government has no legal place denying its recognition, putting “same-sex couples in an untenable position of being in a second-tier marriage.”

“The differentiation demeans the couple, whose moral and sexual choices the Constitution protects, and whose relationship the state has sought to dignify,” Kennedy argued. “And it humiliates tens of thousands of children now being raised by same-sex couples.”

A leading and heartening theme of the ruling is this valuing of dignity, Kennedy at one point describing the effect of the federal law “to disparage and injure.” The language often is sweeping, and appropriately so, finding no logical reason (once the question is asked) for discriminating against same-sex couples married under state law.

Now the debate belongs largely to states, starting with California. The court declined to decide a case involving Proposition 8, arguing the proponents lacked standing, reverting to a district court decision that overturned a ban on gay marriage, reopening the way for same-sex couples to marry. And if other states follow, those gays marrying will not face unequal treatment from the federal government, the court majority mirroring the evolving politics and changing minds.