BALTIMORE -- Seven gay couples in Maryland rang in the New Year with wedding bells early Tuesday, the first wave of nuptials since voters in the state backed the legalization of same-sex marriage.

The couples were "lawfully married" rather than pronounced "husband and wife" at the 12:30 a.m. ET ceremony on New Year's Day in Baltimore's City Hall.

Patrick Semansky / AP William Countryman, left, and Roy Neal exchange vows as officiant Jason Caton looks on during a marriage ceremony at City Hall in Baltimore, Tuesday, Jan. 1, 2013. Same-sex couples in Maryland are now legally permitted to marry under a new law that went into effect after midnight on Tuesday. Maryland is the first state south of the Mason-Dixon Line to approve same-sex marriage.

Baltimore Mayor Stephanie Rawlings-Blake officiated at the wedding of the first of the couples, 68-year-old James Scales and 60-year-old William Tasker. Scales and Tasker said they had been together for 35 years.

The mayor joked that everyone had come to celebrate a relationship that began many years ago -- "and I mean that, many years ago."

Making a statement

Soon after the November vote legalizing gay marriage, Scales, a longtime city employee, asked the mayor to marry the two.

"She wanted to make a statement to tell gay, lesbian, transgendered couples that they're welcome here," said the mayor's press secretary, Ian Brennan, of her decision.

Maine same-sex couples marry in first hours of law

Voters in Maryland, Maine and Washington state approved same-sex unions on Election Day, becoming the only states to pass such a measure by popular vote.

Nine of the 50 U.S. states and Washington, D.C., now have legalized gay marriage. Another 31 states have passed constitutional amendments banning it.

Rawlings-Blake called the Nov. 6 vote "a remarkable achievement for Maryland" and welcomed friends and families of the couples to witness history at the early-morning ceremony.

More coverage of gay marriage on NBCNews.com

"We are excited to open City Hall to host some of the first wedding ceremonies in our great state," Rawlings-Blake said.

Maine began issuing same-sex marriage licenses on Saturday after voters approved the measure in November. Marc Solomon of Freedom to Marry joins MSNBC to discuss the event.

Shift

Public opinion has been shifting in favor of allowing same-sex marriage. A Pew Research Center survey from October found that 49 percent of Americans favored allowing gay marriage, with 40 percent opposed. In May, President Barack Obama became the first U.S. commander in chief to say he believed same-sex couples should be allowed to get married.

The Supreme Court has agreed to review two challenges to federal and state laws that define marriage as a union between a man and a woman.

Complete US coverage on NBCNews.com

The nation's highest court said this month that it would review a case against a federal law that denies married same-sex couples the federal benefits that heterosexual couples receive.

2012 was a significant year for gay rights. The president announced his support of same-sex marriage, the first openly gay woman was elected to the Senate, and marriage equality won on ballots. Melissa Harris-Perry and her panelists discuss.

It also will look at a challenge to California's ban on gay marriage, known as Proposition 8, which voters narrowly approved in 2008.

Washington state's law legalizing same-sex unions took effect on Dec. 9 and Maine's on Dec. 29.

More content from NBCNews.com:

Follow US news from NBCNews.com on Twitter and Facebook