Kate, right, and Trish Varnum of Cedar Rapid. Their case is behind the Iowa Supreme Court ruling on April 3, 2009, that legalized same-sex marriage in the state. / Bryon Houlgrave, The Des Moines Register

by Sharyn Jackson, USA TODAY

by Sharyn Jackson, USA TODAY

DES MOINES, Iowa -- Stuart Gaffney remembers the exact morning when, over coffee in his San Francisco home, he discovered the purpose of Twitter.

Hitting refresh on the Iowa Supreme Court's website proved futile in the early hours of April 3, 2009. About 1.5 million visitors so overloaded the site that it crashed, just as the ruling on Varnum v. Brien was about to be posted.

The case would decide whether an Iowa statute limiting marriage to one man and one woman was constitutional. If the court upheld a lower decision that the law was discriminatory, same-sex marriage would become legal in Iowa.

Gaffney was a Twitter follower of one of the members of the Lambda Legal team that litigated the case, and soon he learned, "justice had been done."

Iowa's Supreme Court Justices - all seven of them - affirmed the lower court ruling. Iowa became the third state in the nation and the first in the Midwest to allow same-sex couples to marry.

For Gaffney and many other observers around the country, "it really was a beacon of hope."

Five years later, Varnum is considered a significant step toward equality for Iowa's lesbian and gay citizens. But its impact is felt far beyond Iowa's borders.

Gaffney may have lived in California, but he cared deeply about what happened in Iowa. He and his husband, John Lewis, had married in 2004, during a brief window when San Francisco Mayor Gavin Newsom granted same-sex couples marriage licenses, only to have the marriage voided six months later.

The couple married again in 2008 as victorious plaintiffs in the landmark California Supreme Court case that legalized same-sex marriage there. But later that year, the voter referendum Proposition 8 enacted a constitutional ban on same-sex marriage, and Gaffney once again saw the movement defeated.

"To be able to get legally married only to have our rights put up for popular vote and taken away just a few months later, I can't tell you how disheartening that moment was," Gaffney said.

Then came Varnum. Whatever happened in Iowa wouldn't affect Gaffney legally, but the symbolism mattered more to him and other activists after the crushing defeat in the California vote a few months earlier.

"In terms of the fallout from (California's) Proposition 8, the fact that we rebounded to this surprising and meaningful victory out of the heartland, that renewed the momentum that we continue to see today," said Evan Woflson, executive director of Freedom to Marry.

Among the ruling's effects around the country in the past five years:

-- It gave gays and lesbians in other states a place where they could go to legitimize their relationships, even if it meant nothing under the law back home. About two-thirds of the nearly 6,000 same-sex couples who married in Iowa from 2009 through 2012 were from out of state, according to statistics from the Iowa Department of Public Health. In some cases, the legal recognition those couples received in Iowa spurred them to fight for same-sex marriage in their home states.

-- Across the country, advocates and activists who had suffered a string of defeats in other states were buoyed by the unanimous ruling and its recognition of same-sex relationships in America's heartland.

"It was absolutely, unquestionably transformative," said Fred Sainz, spokesman for the Human Rights Campaign. "It very much expanded people's world-view of the fact that there were committed and loving gay couples in Iowa that wanted to get married just as much as the couples in New York and California."

Opponents to same-sex marriage also see Varnum as significant, but for different reasons.

"I think people were stunned and wanted a way to overturn it," said Brian Brown, president of the National Organization for Marriage. "The Iowa decision and other cases of judicial imposition are working themselves out so supporters can get what they want through the courts and bypass public opinion."

At the time of the Varnum decision, Massachusetts and Connecticut were the only other states allowing same-sex marriage.

Today, 17 states and Washington, D.C., have legalized same-sex marriage, including Illinois, where weddings begin June 1. And last summer, the U.S. Supreme Court struck down the part of the Defense of Marriage Act that had previously denied married same-sex couples federal benefits.

"Iowa played a key role in making this a national conversation," said Kevin Cathcart, executive director of Lambda Legal, the gay and lesbian legal services organization. "Every victory before and after Iowa was wonderful, but I do think geography is important. We went right to the middle of the country."

Lambda Legal now has 62 cases pending in 29 states and has won a slew of recent court rulings in favor of same-sex marriage in states such as Utah and Texas.

Varnum coincided with changing attitudes on gay marriage nationwide. Since 2009, support for same-sex marriage has moved continually upward, according to annual polls by the Pew Research Center. Five years ago, 37 percent of Americans favored same-sex marriage. Two years later, those who favored it surpassed those who opposed.

Today, according to Pew data, a clear majority of Americans (54 percent) support same-sex marriage, while 39 percent are opposed.

"Public opinion has completely turned around," said Carroll Doherty, director of political research at the Pew Research Center.

The shift is generational, Doherty said.

"This generation of young people is coming in with much different views about homosexuality in general and a much higher support for same-sex marriage," Doherty said. "And then you see the shift across generations at the same time, even among the oldest generation."

Even as a partisan issue, views are changing. A recent Pew poll found that 61 percent of Republicans under 30 favor same-sex marriage.

"This is a very powerful trend across the public, and a lot of the action occurred in 2009," Doherty said.

With the Iowa decision, Americans saw that same-sex marriage was not simply a liberal, coastal issue, advocates say.

"One of the things the decision in Iowa brought home is that this is about fundamental American values," said James Esseks, director of the ACLU's Lesbian, Gay, Bisexual & Transgender (LGBT) Project. "This is about family values, coming from a part of the country that's not the bleeding heart liberals. That's not the way most of the country thinks of Iowa."

As other states act, Iowa's ruling holds

It's been only five years since that morning Stuart Gaffney turned to Twitter to find out what happened in Iowa, but so much has happened since.

States are legalizing same-sex marriage in a number of ways, whether through the courts, the legislature or the ballot box. Gaffney, now a spokesman for Marriage Equality USA, has seen it happen in California again - this time, perhaps, for good.

Through it all, the impact of the Iowa Supreme Court's unanimous ruling in Varnum still holds.

"I really feel," said Gaffney, "that in so many ways, Iowa got it right."