Story highlights 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

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 Chyrino 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.

But the win was hard fought and the margin of victory was small.

JUST WATCHED Popular vote on same-sex marriage Replay More Videos ... MUST WATCH Popular vote on same-sex marriage 02:55

JUST WATCHED Senator ousted over gay marriage remarks Replay More Videos ... MUST WATCH Senator ousted over gay marriage remarks 01:41

JUST WATCHED NFL LB thankful for gay marriage fight Replay More Videos ... MUST WATCH NFL LB thankful for gay marriage fight 01:22

Photos: Same-sex wedding snapshots Photos: Same-sex wedding snapshots Same-sex wedding snapshots – iReporter Alex Rhinehart, center, and Tony O'Brian held their wedding ceremony in a San Francisco park in May 2011, though same-sex marriage was not legal in California at the time. The pair led their guests to the summit of a cliff for the ceremony in lieu of a traditional wedding march -- using the spot to represent their union: "a place so old and solid with such a promising view of the horizon beyond." Hide Caption 1 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Alex and Tony wanted to keep their wedding simple and inexpensive: They made picnic lunches for guests and painted wooden dolls in their likeness for cake toppers. Hide Caption 2 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – The son of iReporter Angela Cloninger (right) walked her down the aisle to meet her partner, Barbara, in a wedding ceremony almost three years ago in Asheboro, North Carolina. A few days later, they legally married on courthouse grounds in Washington, D.C. North Carolina voters recently amended the state constitution to make same-sex marriage illegal. Hide Caption 3 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – iReporter Valezka Taylor decided to adopt a sailor theme so her mate, Sami, could wear her Coast Guard uniform. They were inspired to get married after "don't ask, don't tell" was repealed, but it took an extra nudge from her teenage daughter to set the wheels in motion. Valezka's daughter and her aunt were bridesmaids; they wore red and blue to match the sailor theme. Hide Caption 4 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Sami, a boat mechanic in the U.S. Coast Guard, wore her dress blues for their April ceremony in front of the Constitutional Garden in Washington. Hide Caption 5 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Ra'Shawn (right) and Kelvin Barlow-Flournoy combined their last names after marrying last year at Howard University School of Divinity in Washington. They married during a Sunday service that was streamed online and viewed by more than 400 people. Both are pastors, and Ra'Shawn is an HIV prevention coordinator for a church in Charlotte, North Carolina. Hide Caption 6 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Ra'Shawn and Kelvin have worked with Human Rights Campaign to spread the word that people of faith can be advocates for gay and lesbian rights. They married during a trip to the Capitol as part of HRC's Clergy Call. Hide Caption 7 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Kevin Haubrick, left, met his husband Mike online in 2009. It quickly became clear to Mike that Kevin was "the one" when he saw Kevin interact with his daughter, Elizabeth. The pair wed at a bed and breakfast in Arlington, Vermont, the following year in the presence of friends who helped Kevin create his online profile. Hide Caption 8 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – After the ceremony, they had dinner and cake complete with a customized wedding topper. The following month, Mike and Kevin held a wedding reception in their home city of San Antonio for friends and family. Hide Caption 9 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Craig Woodward (left) proposed to Scott Norton by the ocean at Laguna Beach, California, and surprised him by having all his family and friends there to share it. Hide Caption 10 of 11 Photos: Same-sex wedding snapshots Same-sex wedding snapshots – Scott and Craig were married in California in front of 100 friends and family. The minister did a reading of Dr. Seuss and the wedding party members boogied down the aisle, each to a personalized song. Here, their friend Chris Williams catwalks down the aisle to "I'm Every Woman" by Whitney Houston. Hide Caption 11 of 11

"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.

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 June CNN/ORC poll , for example, reflected such a shift in opinion in the U.S.

Support has been growing for decades.

In the 1990s, most Americans told pollsters they did not know anyone close to them who was gay. By 2010, the number of Americans who said they had a gay or lesbian close friend or family member was 49%. This year, that number stands at 60%.

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 in my 17 years of voting," said Derek Hurder from Hampden, Maine, who's been with his partner, Chris McLaughlin, for a year and a half.

They're 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 won't 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 last September -- in a church.

"We are affiliated with the United Methodist Church, which on the 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 their wedding, they applied for a name change. Now that the referendum has passed, they'll apply for a marriage license.

Maine should begin granting marriage licenses to same-sex couples in mid-December, according to same-sex marriage supporters at Freedom to Marry.

What the measures say

The two measures 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.

Maryland's ballot reads, "Civil marriage laws allow gay and lesbian couples to obtain a civil marriage license."

Both measures also explicitly mention the right of clergy to refuse to wed gay and lesbian couples if it goes against their religious convictions.

"This chapter does not require any member of the clergy to perform or any church, religious denomination or other religious institution to host any marriage in violation of the religious beliefs of that member of the clergy, church, religious denomination or other religious institution," Maine's Question 1 states.

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 say the new laws in both states 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 online opinion by parents stating that legalizing same-sex marriage would lead to the promotion of homosexuality in school curriculum.

Sainz believes the campaigns supporting the Maine measure paid off.

In 2009, a similar referendum in Maine failed when voters rejected the governor's decision to allow same-sex marriage. Tuesday's results represent a remarkable turnaround.

"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.

In the six states -- Massachusetts, Connecticut, Iowa, Vermont, New Hampshire and New York -- and the District of Columbia where gays and lesbians have previously won marriage rights, it was because of actions taken by judges or legislators, not voters.

On election night, Tobey joined friends as they all watched results on TV.

She wasn't expecting Maine's ballot to pass. But then they heard the news.

"I said: 'Hey, did that just happen?' "

She did a double take.