Douglas Emmons of Maine, who had opposed same-sex marriage, said his daughter, Holly, helped persuade him to change his mind.

Elated by their first ballot victories, in four states, advocates of same-sex marriage rights plan to push legislatures in half a dozen more states toward legalization as they also press their cause in federal courts. They are also preparing for what they hope will be another milestone: the electoral reversal of a constitutional amendment defining marriage as solely between a man and a woman, in Oregon in 2014.

Nine states and Washington, D.C., have now legalized same-sex marriage. Though it remains unpopular in the South, rights campaigners see the potential for legislative gains in Delaware; Hawaii; Illinois; Rhode Island; Minnesota, where they beat back a restrictive amendment last Tuesday; and New Jersey, where Gov. Chris Christie vetoed a bill to legalize same-sex marriage in February.

A rapid shift in public opinion is bolstering their cause as more people grow used to the idea of same-sex marriage and become acquainted with openly gay people and couples. “The pace of the change in opinions has picked up over the last few years,” said Michael Dimock, associate research director of the Pew Research Center in Washington, “and as the younger generation becomes a larger share of the electorate, the writing is on the wall.”

A close look at this year’s campaigns, from Maine to Washington State, shows how rights activists intend to hasten that shift in the future, relying especially on patient, labor-intensive personal dialogue.

Here in Maine, voters rejected same-sex marriage only three years ago, 53 percent to 47 percent. Mainers United for Marriage, which advocates same-sex marriage rights, phoned some 250,000 residents or knocked on their doors, engaging many of them in 20-minute conversations about love, marriage and commitment and persuading some to rethink their views. “We asked people what marriage meant in their lives,” said Matt McTighe, the group’s campaign manager.

Last Tuesday the numbers were reversed, with Maine legalizing same-sex marriage by 53 percent to 47 percent.

Douglas Emmons, 52, of Biddeford voted against gay marriage in 2009 but changed his mind this year, he said, after urging by his daughter, a recent college graduate, and an hourlong discussion with Randy Hazelton, a field organizer for Mainers United for Marriage.

“It’s still something that’s uncomfortable; it doesn’t seem quite natural,” Mr. Emmons said. “But I guess everybody should have an equal chance at marriage if they want it.”

In the latest state elections, rights advocates also moved beyond abstract appeals about civil rights, using advertisements that hit home with more conflicted voters, said Amy Simon, a pollster with Goodwin Simon Strategic Research in Oakland, Calif., who advised the rights campaigns in Maine and Washington.

Many television commercials presented loving, committed gay and lesbian couples or endorsements from straight, respected people from unexpected corners of the community, like a firefighter in Maine.

The advocates benefited from a threefold advantage in fund-raising, with large donations in Washington State from Jeff Bezos of Amazon and his wife and from Bill and Melinda Gates, and large personal contributions to all four campaigns from Mayor Michael R. Bloomberg of New York. But most of the money came as small donations, raised nationally by gay-rights groups.

The most ardent opponents of same-sex marriage, led by evangelical Christians and the Roman Catholic Church, have vowed to redouble their defense of “natural marriage,” even comparing it to the continuing fight against legal abortion.

So far, these opponents say they do not believe that the national tide has shifted against them but rather that they allowed themselves to be badly outspent in liberal-leaning states.

“We lost by small margins in bastions of deep-blue America,” said Brian S. Brown, president of the National Organization for Marriage. He noted that 30 states have constitutional amendments banning same-sex marriage. He said he expected Indiana to vote on such an amendment in the next year or two, “and we will win.”

But some Republicans question whether their party should try to resist a seemingly unstoppable demographic trend. “The die is cast on this issue,” said Steve Schmidt, who advised the presidential campaigns of Senator John McCain and George W. Bush and has for years urged Republicans to accept same-sex marriage. “Why should we sign a suicide pact with the National Organization for Marriage?” Mr. Schmidt asked, saying the party should instead endorse the principles of federalism and let the states decide the matter.

Beyond seeking repeal of Oregon’s marriage amendment, rights activists feel they can win in a repeat ballot in California if the courts do not first invalidate Proposition 8, the 2008 referendum that banned same-sex marriage, but faces a legal challenge.

But repealing amendments would be much harder in many other states, where one or two years of legislative action must often precede a public vote.

In the end, strategists for marriage equality say, broad national change is most likely to come through the courts, as restrictive policies are challenged as unconstitutional. This month, the Supreme Court will decide whether to consider cases involving the federal Defense of Marriage Act, which bars federal programs from recognizing same-sex marriage, and California’s Proposition 8. But few expect the justices to require sweeping national change at this point.

“Marriage discrimination will end when the Supreme Court brings the country to a national resolution,” said Evan Wolfson, president of Freedom to Marry, a group that provided money and tactical help to the four state campaigns this year.

“But the Supreme Court doesn’t typically jump in early,” Mr. Wolfson said, citing the long struggle to abolish restrictions on interracial marriage. In the meantime, he said, “we are working to build a critical mass of state policies and public opinion, creating the climate for the Supreme Court to act.”

Tony Perkins, president of the Family Research Council, a conservative Christian group, disputed the notion that history is on the side of same-sex marriage, arguing that the legalization of abortion by Roe v. Wade in the 1970s had set in motion a powerful and still growing backlash.

Over time, Mr. Perkins predicted, as people see what he called the consequences of same-sex marriage — grade schools’ endorsing homosexuality, business owners and religious institutions forced to act against their religious beliefs — opposition will rebound.

Rights advocates say such conflicts are rare and not caused by marriage laws. They cite polling data that points the other way: most people in states with same-sex marriage say it has not affected them, and in those states, as throughout the country, as people get to know gay and lesbian couples, they are more likely to support marriage rights.

Mr. Emmons, the Maine voter who switched sides, said his opposition was shaken when he attended his gay nephew’s wedding in Massachusetts. “It was very nice; it seemed O.K.,” he recalled.

The ballot referendum in Maine this year was the first to be proposed by gay-rights advocates, rather than forced upon them by opponents. More initiatives are planned, but electoral challenges should be used sparingly, said Mr. Wolfson, the gay-rights strategist.

“You don’t want to put it up to a vote unless you think you have the votes,” he said. “This is only part of the mix, along with the courts and legislatures.”

Frank Schubert, a consultant to the National Organization for Marriage who managed all four state campaigns to block same-sex marriage, said, “I think the messaging was working; we just didn’t have enough of it.” He said he expected to continue running advertisements warning that “changing the definition of marriage” would have negative effects on society.

But Zach Silk, the campaign manager of Washington United for Marriage, an advocate for same-sex marriage rights, argued that what he called “scare tactics” had fallen flat this time, and he predicted they would probably fail again. “The fear and confusion they used to win in other places, it’s an old playbook and it doesn’t work any more.”