SALT LAKE CITY – Hours after federal judges struck down bans on same-sex marriage in Utah and Oklahoma, activist Evan Wolfson and his colleagues reached out to gay-rights groups in the deeply conservative states with both congratulations and a reminder: Court wins alone won’t be enough.

Wolfson knows the perils of judges forcing social changes on a population that isn’t ready for them – he filed the first successful gay-marriage lawsuit in the 1990s in Hawaii, and the backlash against that case convinced him to focus on the political process rather than litigation alone.

That strategy has helped lead to a stunning turnaround in public opinion on gay marriage and a series of electoral wins that laid the groundwork for the recent court rulings.

In both states, elected officials largely greeted the rulings with fury, and gay-rights groups are bracing for a series of proposals in the state legislatures that could target their community.

“There’s a widespread sense of surprise and umbrage that one judge could do that,” said Paul Mero of the Sutherland Institute, a conservative think tank in Utah. “I’m disappointed that any single lower court judge thinks they can overrule millennia of custom, tradition and law.”

John Williamson, who wrote the ballot measure that was overturned in Oklahoma last week, said that as a Christian he will never accept the legitimacy of gay marriage.

“But in states that by a vote of the people have approved that, I say ‘OK, they got what they want. You have a majority of the people there, and if the minority doesn’t like it, they can move to Oklahoma,” Williamson said, a former state Senate president. “But now what can we do?”

Wolfson and his group, Freedom to Marry, is scouring Oklahoma and Utah for same-sex couples who can put a human face on the new rights.

“We have learned the lesson that political organizing and public education must accompany” court wins, he said.

Since it began two decades ago, the campaign for gay marriage has walked a delicate tightrope between relying on the courts and old-fashioned shoe leather political persuasion.

In the case where Wolfson was co-counsel, the Hawaii Supreme Court in 1993 ruled that gay couples must be granted the right to marry. That was followed by a voter-approved constitutional amendment that said marriage could be defined only by the Legislature as well as the federal Defense of Marriage Act. Other states, too, rushed to outlaw gay marriage.

Slowly, the tide turned. In 2012, gay-marriage supporters won three ballot battles to legalize same-sex marriage and turned back a fourth to bar it. A lawsuit challenging Proposition 8 reached the U.S. Supreme Court.

Shortly before the court announced its decision, Justice Ruth Bader Ginsburg raised eyebrows by giving a speech that criticized Roe v Wade for stopping what could have been a more effective state-by-state push to legalize abortion. When the ruling came on Proposition 8 and a related challenge to the Defense of Marriage Act, the court pointedly did not legalize gay marriage nationwide. But its finding that the Defense of Marriage Act violated the 14th Amendment sparked the flurry of litigation that led to the December ruling in Utah and last week’s in Oklahoma City. Both of those decisions are being appealed to the 10th Circuit in Denver.