The range of Republican opinion on the Supreme Court’s declaration of a constitutional right to same-sex marriage extends from Mike Huckabee, who wants a constitutional amendment to undo this “judicial tyranny,” to Lindsey Graham, another presidential candidate, who respects the Court’s decision but remains a “proud defender of traditional marriage” and will commit himself to “the protection of religious liberties of all Americans.”

I suspect that conservatives will migrate toward Graham’s view over time—that the same-sex marriage issue will fade into the background of the country’s political dialogue—but that they will be somewhat slower to forgive the Supreme Court itself. When one of its own justices, conservative icon Antonin Scalia, dissents “to call attention to the Court’s threat to American democracy,” it’s a fair bet that the right will harbor bitterness toward the Court over this for some time.

They should be extremely grateful instead.

Ending the same-sex marriage debate is the biggest favor the Court has done for the American right in decades. This issue is a year or two away from being poison to the Republican Party, and thus to the broader political aims of the conservative movement. Unlike just about any other issue position, opposition to same sex marriage has become a heuristic younger people use to determine that a politician isn’t worth listening to. Absent this ruling, the party's base was going to trap them there forever.

Winning by losing like this is nothing new from conservatives. It has helped save them from extinction before. If a different Supreme Court hadn't helped end the civil rights debate, a big segment of the country would’ve remained separate-but-equal fanatics for years and years, and driven their elected officials into that dead end with them.

That the Supreme Court could, say, eviscerate the Voting Rights Act in 2013, and set the right-most flank of the voting rights debate just inside the bounds of political norms was a huge coup for conservatives, but it was only possible because the Court settled the equality question decades ago. The Court’s interventions back then became a source of huge consternation on the right for years and years, just as this decision is likely to be, but its actual legacy was to allow conservatives to fight another day and win future victories. Today’s decision will play the same role.