Voters in Maine and Maryland approve same-sex marriage It's the first time voters have approved same-sex marriage In the past, only judges or legislatures had approved it The votes show a dramatic shift in attitudes over the decades (CNN) -- In a historic turnaround, the ballot box is showing America's shifting attitudes about same-sex marriage. After gay marriage rights died at the polls dozens of times in the past, on Tuesday they passed in at least two states. Rarely do popular votes reflect such dramatic social changes. The result: Maryland and Maine will now allow couples like Cyrino Patane and James Trinidad to tie the knot. The Maryland couple has been together for seven years, and now, after the historic vote, they plan to marry in the next six months to a year. "Both families will be at the wedding," Patane said. Same-sex wedding snapshots But the win was hard fought and the margin of victory was small. "We've lost at the ballot box 32 times," said Paul Guequierre of Human Rights Campaign. History was made tonight. In Maine, Erica Tobey and Ali Ouellette wed in September, but only now will the women's marriage be recognized under Maine law. "It's hard to overstate the national significance of this vote," Marc Solomon, campaign director at Freedom to Marry, said of the Maine referendum. Related: French ministers back same-sex marriage In Maryland, where just 51.9% of voters approved gay marriage rights, "It was a little bit pins and needles," said Human Rights Campaign's Kevin Nix. It was going to be a close call all along. A similar ballot measure in Washington state is pending. And in Minnesota, voters rejected a measure that would have banned same-sex marriage. Pollsters got a hint of the coming change. Recent national surveys have shown shifting attitudes toward same-sex marriage, with a majority of Americans now approving of marriages between two men or two women. A CNN/ORC poll in June found that a majority of Americans support marriage rights for gays and lesbians, reflecting the shift in public opinion. The number of Americans who say they have a close friend or family member who is gay or lesbian, meanwhile, has jumped from 49% in 2010 to 60% today, the first time in CNN polling that a majority of Americans have said that. In the 1990s, most Americans said they did not know anyone close to them who was gay. Election Day brought two additional gains for proponents of same-sex marriage: Wisconsin elected America's first openly lesbian Senator, Democrat Tammy Baldwin, and President Obama became the first president to openly support same-sex marriage and get re-elected. I have never been this happy after an election. Derek Hurder, Hampden, Maine, same-sex marriage supporter "I have never been this happy after an election in my 17 years of voting," said Derek Hurder from Hampden, Maine, who has been with his partner, Chris McLaughlin, for a year and a half. They are not yet ready for marriage, but they were elated about having the option. And they both voted to re-elect the president. The change in attitude makes them feel more comfortable, but that has its limits. "I wouldn't feel safe walking down the street holding hands," Hurder said. Patane and Trinidad share their Catholic faith and are despondent that the church will not recognize their union. "I believe in a religious marriage," Trinidad said. I recognize that it's going to be a nonreligious wedding. Tobey and Ouellette, who met four years ago, tied the knot in a church in September. "We are affiliated with the United Methodist Church, which on a whole does not support same-sex marriage," Tobey said. But their church made a hearty exception. We had three pastors who know us and love us and agreed to do that for us. The legal situation led the couple to do things in reverse order. After wedding and applying for a name change, now that the referendum has passed, they will apply for a marriage license last. Maine should begin granting marriage licenses to same-sex couples in mid-December, according to same-sex marriage supporters at Freedom to Marry. The two ballots that passed, called "Question 1" in Maine and "Question 6" in Maryland, contain similar language. The words man and woman "relating to the marital relationship or familial relationships must be construed to be gender-neutral for all purposes," the Maine measure says. Both measures also explicitly mention the right of clergy to refuse to wed gay and lesbian couples if it goes against their religious convictions. The governments of Maine and Maryland had passed laws permitting same-sex marriage, but activists opposed to the laws collected enough signatures to put them on a ballot, said Fred Sainz, a spokesman for Human Rights Campaign, which raised $32 million for its campaigns on the referendums that included radio and television ads, social media strategy and on-the-ground canvassing by thousands of volunteers. Opponents of same-sex marriage in both states say that the new laws will redefine marriage for everyone as a genderless union and endanger the fabric of society. "Such a radical change in the definition of marriage will produce a host of societal conflicts that government -- exercising its enormous enforcement powers -- will have to resolve," argues Maryland Marriage Alliance. The group also published an opinion by parents on its home page stating that legalizing same-sex marriage would lead to the promotion of homosexuality in school curriculum. Election results raise questions about Christian right's influence Sainz believes the campaigns for passage of the measure paid off. "The secret to our success is that we won over hearts and minds," Sainz said. Americans are fair and want to see their gay and lesbian friends, co-workers and family members have the freedom to marry. Thirty-eight states have passed bans on marriages between people of the same gender, mostly by amending their constitutions to define marriage as a union between a man and a woman. Tobey wasn't expecting Maine's ballot to pass, as she watched election results come in with friends on Election Night. Then they heard the news. I said: 'Hey, did that just happen?'  She did a double take.