Four women, surrounded by a gaggle of reporters and photographers, elected officials, and government workers, smiled and hugged, patting one another on the back.

"You're getting married too? Congratulations!" Ellen Toplin had exclaimed.

Toplin and her partner, Charlene Kurland of Upper Dublin, had just obtained a marriage license from the Montgomery County register of wills. The other couple, Tamara Davis and Nicola Cucinotta of Paoli, were next in line.

Same-sex marriage is illegal in Pennsylvania, but Register of Wills D. Bruce Hanes announced Tuesday that he believed the law was unconstitutional and would not enforce it.

So, on Wednesday afternoon, two couples who had never met before found themselves in Norristown, sharing a moment of warmth and joy, united by a common struggle.

Toplin and Kurland, partners for 22 years, said they had encountered problems with medical insurance and financial arrangements because they could not legally marry.

Davis and Cucinotta got engaged in fall 2012, but had to put their wedding plans on hold when the Chester County register of wills rejected their request for a marriage license.

Hanes' decision was hailed by the Democratic-led Board of Commissioners, which promised to recognize and defend the marriage licenses.

Republican Commissioner Bruce L. Castor Jr. disagreed, saying Hanes had overstepped his authority. County GOP Chairman Robert J. Kerns agreed.

"Bruce Hanes, like Democrats from President Obama on down, clearly believes he can simply ignore a law if he doesn't like it," Kerns said in a statement. "Regardless how you feel about it, until the Legislature changes the law or the court says otherwise, it is the law of the commonwealth."

No other county appears poised to follow Hanes' lead.

"Until the courts of Pennsylvania determine the validity of same-sex marriages and the Defense of Marriage Act, it is outside the authority of my office to issue marriage licenses to same-sex couples," said Philadelphia Register of Wills Ronald R. Donatucci.

As of Wednesday afternoon, Hanes and other county officials said they had gotten no feedback from the state level. Absent a statewide directive, it may come down to individual agencies - tax boards, social services, insurers, hospitals - to make the first determination.

Five marriage licenses were issued Wednesday to same-sex couples in Montgomery County.

Sasha Esther Ballen and Diana Lynn Spagnuolo of Wynnewood were the first in line. A sheriff's deputy said they showed up around 7:30 a.m. - an hour before the office opened.

Loreen Bloodgood and Alicia Terrizzi of Pottstown were also there when the doors opened. Within hours, they became the first lesbian couple to marry in Pennsylvania.

Bloodgood and Terrizzi, who have been together for nearly 20 years, obtained a waiver on the three-day waiting period. They went to a park in North Wales and took their vows in front their two sons and a nondenominational minister.

The minister, Craig Andrussier, hustled back to Norristown to file the license and the waiver, making it official.

"It was short and sweet, just to get it on the record," Andrussier said, adding that they wanted to get the paperwork finalized "before anything was hastily thrown out."

Daniel Clifford, a Norristown-based family lawyer, said the marriage remains a gray area most likely to be settled by the courts.

The state's same-sex marriage ban is being challenged in federal court, in a lawsuit filed this month by the American Civil Liberties Union. Now it is likely to be challenged in state court as well.

Despite the uncertainty, Clifford said he and his partner might take the plunge this week too.

State Sen. Daylin Leach, a Democrat who represents Montgomery County and is sponsoring a bill to allow same-sex marriage, also indicated that the courts may act before the Republican-led Legislature does.

"All of these are cracks in the wall of discrimination, which make it harder to sustain," Leach said, referencing the Supreme Court's rejection of the federal Defense of Marriage Act and a wave of states approving marriage equality laws. "We're close to reaching a tipping point."

Marcus Saitschenko and James Goldstein of Philadelphia were the only male couple to apply Wednesday.

They had a commitment ceremony years ago, so this time they plan to keep it simple. "We're not doing this for the party," Saitschenko said. "We're doing this for the civil rights."

The atmosphere in the register's office was jubilant - and a bit chaotic - Wednesday, with Democratic Commissioners Josh Shapiro and Leslie S. Richards and numerous staff coming down to show their support.

Each couple also had to decide who would take the "bride" position and who would be the "groom."

"Well we're both female," Kurland chuckled.

Davis and Cucinotta talked to their parents and chronicled the experience on their smartphones.

"Can I take a picture of it?" Davis asked as she looked over the license, officially stamped with a red seal.

"You can take it with you," the staffer replied.

Inquirer staff writer Troy Graham contributed to this article.