ALBANY -- City Hall was a hub of celebration Sunday morning as gay and lesbian couples from around the Capital Region became among the first in the state to wed under New York's historic same-sex marriage law.

The Common Council chambers broke into applause when Al Martino and Harold Lohner were married at 12:16 a.m. State Supreme Court Justice Joseph Teresi performed city's first public ceremony, while Mayor Jerry Jennings performed a private ceremony for another couple in his chambers.

David Janulis and Don Grandchamp of Glenmont were the second couple to marry, completing their vows at 12:23 a.m.

Right after they kissed, Janulis shouted "Yes" and held his hands up in victory.

Hundreds of same-sex couples across New York state planned to marry on Sunday. The weddings put New York at the forefront of the gay rights debate and symbolized an important milestone for activists pushing for the legalization of same-sex marriage across the country.

"It's kind of amazing, overwhelming," Beth Relyea said shortly after arriving at City Hall to marry Joanne Trinkle. The Glenville couple had also expected to marry in Albany Sunday morning. "I didn't realize the 'minute' it became legal we would do it."

Six couples were expected to be married by Jennings and Teresi.

The first couple Mayor Jerry Jennings was expected to marry Sunday morning was to be the private ceremony for Barbara Laven, chairwoman of the city's Human Rights Commission, and Dale Getto, a principal in the city school system. Jennings and Laven are longtime friends.

Jennings was eager to perform the state's first same-sex marriage when the law went into effect at 12:01 a.m. He opened City Hall Saturday night and was expected to begin marriage ceremonies shortly after the landmark legislation took effect.

Another first marriage was scheduled to take place just after midnight in Niagara Falls, where officials planned to illuminate the famous cascade in the colors of a rainbow. And a couple in Hudson, Linda Mussmann and Claudia Bruce, were vying to be the first to marry.

A small crowd began to grow outside City Hall around 11:30 p.m. Sunday as friends and relatives took pictures with the soon-to-be wedded couples -- many hoping they didn't sweat through their dresses and suits as temperatures still hovered in the 80s.

Ed Davis of Watervilet showed up early to hand out white roses to couples. Davis' two daughters are lesbian, and he was fixture at the Capital as the Legislature debated the law last month.

"This ranks up there with I don't know what," Davis said about being present Sunday night. "It's a long time coming."

Albany city employees arrived at City Hall shortly before 11 p.m. to get ready for the rapid-fire weddings. Many of them dressed up for the occasion.

"If we had to be at work, we should look like we're going to a wedding," said Melinda Griffin, an employee in the city clerk's office.

In New York City, 823 couples signed up in advance to get marriage licenses on Sunday, and many of those couples were expected to marry minutes later in city clerk's offices across the five boroughs. Officials from more than a dozen cities and towns from Buffalo to Brookhaven said they would open their offices to issue marriage licenses on Sunday, and more than 100 judges across the state have volunteered to officiate at the couples' weddings on the spot.

"This is long overdue," said Mayor Matthew T. Ryan of Binghamton, who planned to preside at the wedding of at least two local couples, and who invited same-sex couples from Pennsylvania, and from New York City, to come to his city to be married. "It really is a great day for all of us who believe in inclusiveness and equal rights for everybody."

The weddings -- businesslike ceremonies in fluorescent-lit city offices for some, lavish catered affairs for others -- represent the end of a political campaign that lasted for years. On June 24, the state Senate voted 33-29 to approve same-sex marriage, and Gov. Andrew M. Cuomo signed it into law that night. But the law did not take effect for 30 days, which is why Sunday is the first day that clerk's offices were permitted to issue marriage licenses to gay couples.

"As the hours tick by, we're getting more and more excited," Brian Banks, a 33-year-old middle-school special-education teacher from Albany, said on Friday after going to City Hall there to fill out paperwork. Banks planned to marry his partner of seven years, Jon Zehnder, 37, a high school math teacher, at the midnight ceremony Sunday in Albany. "Even though we've always viewed ourselves as married, to have there be no asterisk next to it, it'll just feel really good," he said.

Not everyone will be celebrating. Town clerks in at least two rural communities have resigned in recent days, saying their religious convictions precluded them from marrying gay couples, and some cities will see public demonstrations Sunday. The National Organization for Marriage is planning protests on Sunday afternoon at the state Capitol, outside Cuomo's office in Manhattan and in the two largest cities upstate, Buffalo and Rochester.

But a sampling of pastors in the New York City area found that most did not intend to discuss same-sex marriage in their Sunday sermons. At St. Patrick's Cathedral, the seat of the Roman Catholic Archdiocese of New York, for example, the homilist planned to speak on other subjects. "There may not be much more to say at this point," Joseph Zwilling, a spokesman for the archdiocese, said.

New York is the sixth, and largest, state with legalized same-sex marriage. Several other states are considering following suit, and on Sunday, some gay rights activists plan to gather in Hoboken, N.J., to call on New Jersey lawmakers to follow New York's lead and allow gay couples to wed.

But most states have either laws or constitutional amendments barring same-sex marriage, and federal law bars the federal government from recognizing same-sex marriages.

"It's a huge step forward, and yet it doesn't erase the fact that there's so many roadblocks facing advocates of marriage equality," said George Chauncey, a historian at Yale and the author of "Gay New York: Gender, Urban Culture, and the Making of the Gay Male World, 1890-1940."

"Most of the time, an awful lot of the nation doesn't want to be like New York at all," Chauncey said. "I suspect that many people will take this as one more sign of what happens in the Northeast, and in New York in particular, that they don't want to have happen in their own communities."