Eight years ago Sunday, the Supreme Court handed down a significant victory for gay equality when it declared anti-sodomy laws unconstitutional in Lawrence v. Texas. In response, Justice Antonin Scalia bitterly dissented, predicting that the court’s opinion would inexorably lead the judiciary to permit marriages for gays and lesbians.

It took the Massachusetts Supreme Judicial Court less than five months to vindicate Scalia’s prediction when it cited Lawrence in finding that the state’s own constitution protects same-sex marriage. The conservative justice has not, however, had an opportunity to directly consider the merits of same-sex marriage.

The Supreme Court under Chief Justice John Roberts is scheduled to wrap up its term on Monday, having issued controversial decisions protecting the free speech rights of protesters near a military funeral and refusing to certify a class-action lawsuit against Wal-Mart alleging gender discrimination. But a lawsuit asserting a constitutional right to gay marriage has yet to arrive at the Supreme Court. Why not?

The answer, it turns out, is that the lawyers most likely to file such a claim have a misguided understanding of the Supreme Court’s role in American history. They believe the court interprets the Constitution in a manner that merely reflects the consensus values of society and that filing a same-sex marriage lawsuit before the country has embraced the cause is a fool’s errand. That understanding, however, hinges on a distorted view of history. The Supreme Court has not always waited for the values of society to change; it has sometimes shaped those values. In fact, the current court may be prepared to recognize a right to same-sex marriage, even though the issue remains hotly contested. By deferring a federal lawsuit in the hope that public opinion will improve, gay rights advocates could find that a promising window has closed.

In the wake of the Lawrence ruling, the nation’s mainstream gay rights advocacy organizations made a collective decision to forgo a federal lawsuit. Instead, they have focused on strategically chosen state supreme courts. Matthew Coles, director of the ACLU’s Lesbian & Gay Rights Project, wrote in 2004 that “the best way to win the marriage for same-sex couples is to win in as many states as we can before we head to the Supreme Court.”

These advocates were in no hurry to get a case before the Supreme Court because public opinion surveys, while finding increasing approval of same-sex marriage, revealed nothing approaching a consensus in favor of the idea. Polling showed, however, that younger people support gay marriage by wide margins, so these advocates figured that biding their time before petitioning the court was prudent.

This united front held until 2009, when David Boies and Theodore Olson — erstwhile antagonists from the Bush v. Gore litigation — filed a same-sex marriage lawsuit in a California federal district court. The mainstream gay rights community was apoplectic. Various leaders derided the lawsuit as “reckless,” “risky” and, above all, “premature.” The Human Rights Campaign and Lambda Legal, along with other organizations supportive of same-sex marriage, even released an unusual statement condemning the lawsuit’s timing: “The history is pretty clear: the U.S. Supreme Court typically does not get too far ahead of either public opinion or the law in the majority of states.”

Many advocates of same-sex marriage who worry that it is too early for a federal lawsuit cite the quest decades ago to eliminate bans on interracial marriage. The court did not invalidate such laws during the 1950s, they note, when interracial marriage remained extremely divisive. Instead, it waited to issue Loving v. Virginia until 1967, when only 16 states retained anti-miscegenation statutes. “So long as interracial marriage intensely divided the country, the Warren Court was not prepared to insist upon a norm of equality,” Yale law professor William N. Eskridge Jr. and attorney Darren Spedale wrote in May 2009. They further suggested that it would be daft to believe that the current court would issue a favorable same-sex marriage decision while opposition remained strong. Judge Richard Posner ventured a similar analysis for the New Republic last year: “Until homosexual marriage becomes as uncontroversial in most states as racial intermarriage had become by 1967, the Court will, in all likelihood, stay its hand.”

But in 1967, most Americans did not welcome interracial marriage. To suggest otherwise is profoundly misleading. While Americans registered greater approval of such marriages in the late 1960s than in the previous decade, national opinion remained clearly opposed, even after the Supreme Court decided Loving. A Gallup poll in the 1950s revealed that nine out of 10 whites disapproved of interracial marriage; in 1968, a Gallup poll showed that three out of fourwhites continued to frown on interracial unions. The 1968 figures taking account of all races were not much different: 73 percent of Americans disapproved of the practice.

The modest number of states that had anti-miscegenation laws when Loving was decided, moreover, hardly indicates that citizens in the other 34 states considered race irrelevant to marriage. A clear majority of Americans deemed race exceedingly relevant and had no compunction about expressing this belief to pollsters. In fact, Gallup did not register a majority approving of interracial marriage until 1997 — three decades after Loving recognized the constitutional right.

By contrast, even some of the bleakest same-sex marriage polls of recent years would have cheered advocates of interracial marriage in the age of Loving. A 2008 Quinnipiac University poll, for instance, found that 55 percent of respondents opposed gay marriage. And the most recent round of data, collected this year by Gallup, CNN-Opinion Researchand the ABC News-Washington Post poll, found that slightly more than 50 percent of adults responded approvingly to questions regarding same-sex marriage.

The vast majority of states, however, still prohibit gay marriage. When the New York Senate voted to permit same-sex marriage late Friday, the state became only the sixth — along with the District of Columbia — to allow such unions. Can the Supreme Court actually proclaim that more than 40 states are violating the Constitution?

It can and it has, even in emotionally charged cases. When the court declared in 1989 that flag-burning was constitutionally protected speech, for example, it altered the law in 48 states. Getting out in front of many of their fellow citizens is not something that judges should invariably avoid. Sometimes, it is simply a part of the job.

The Boies-Olson lawsuit that worried so many gay rights advocates is now stalled, and unusual procedural quirks may prevent the Supreme Court from ever resolving it. The suit’s progress offers a vivid reminder of how major social issues make their way to the high court: very slowly. And the landscape sometimes shifts dramatically in the meantime. This very dynamic appears to be unfolding for same-sex marriage.

The surge in public support for same-sex marriage has mirrored change in the political world. Despite expressing religion-based opposition to gay marriage during the 2008 campaign, President Obama recently allowed that his views are “evolving.” This isn’t idle chatter: In December, Obama signed a law repealing the military’s “don’t ask, don’t tell” policy, and two months later, his Justice Department announced that it would no longer claim that the Defense of Marriage Act passes constitutional muster.

But even if Obama announces that he favors same-sex marriage and public support for the issue continues to rise, nothing guarantees that the Supreme Court will follow suit. The judiciary, for better and for worse, does not move in lock step with the American people.

Most observers believe that any decision on gay marriage by the current court would probably come down to the opinion of Justice Anthony Kennedy. But that is no cause for pessimism. The gay equality movement has had few judicial friends more staunch than Kennedy, the author of the court’s two leading decisions honoring that cause.

In addition to writing Lawrence in 2003, Kennedy wrote a significant opinion for the court in Romer v. Evans, seven years earlier. That decision invalidated an amendment to Colorado’s constitution that prohibited treating homosexuality as a class deserving protection from discrimination. Kennedy pointedly began Romer by citing Justice John Marshall Harlan’s much-celebrated dissent in Plessy v. Ferguson, the 1896 case that validated “separate but equal.” With that exquisite citation, Kennedy demonstrated that he understood the movement for gay equality to be a legitimate heir of the movement for racial equality. His concern about society’s treatment of gays extends at least as far back as his days as a circuit court judge. In fact, an opinion involving gay rights that he wrote for the Court of Appeals for the 9th Circuit in 1980 caused some Reagan administration officials to find the prospect of placing him on the Supreme Court deeply disconcerting.

Kennedy has now served on the court for nearly 25 years. In the event that Obama should not win reelection next year, it seems probable that a Republican president would attempt to replace Kennedy, who turns 77 in 2013, with a justice less receptive to gay equality.

If such a personnel switch does take place before a same-sex marriage case reaches the court, the Boies-Olsen lawsuit may end up being not premature, but belated.

Justin Driver teaches constitutional law at the University of Texas.

Read more from Outlook, friend us on Facebook, and follow us on Twitter.