HARRISBURG, Pa. (AP) — For two months, an elected court clerk in the Philadelphia suburbs has been giving something to same-sex couples they have not been able to get anywhere else: a Pennsylvania marriage license.

Now a court has to decide whether the clerk has singlehandedly added Pennsylvania to the growing list of states that formally sanction same-sex marriages or whether he has been acting illegally and must be stopped.

Wednesday's hearing in Harrisburg pits Gov. Tom Corbett's Health Department against D. Bruce Hanes, Montgomery County's register of wills, who issues marriage licenses as part of his duties as clerk of the county orphan's court.

Hanes began giving marriage licenses to gay couples in late July, shortly after the U.S. Supreme Court threw out portions of the federal Defense of Marriage Act. Pennsylvania is the only Northeastern state that has neither gay marriage nor civil unions, but the legality of the more than 150 such licenses Hanes has handed out remains an open question.

David Cohen, an attorney representing 32 couples who received licenses from Hanes, says it's too early to speculate on the legal status of those marriages.

"That's certainly unknown because it would depend on the scope of the decision," Cohen said. But he added that there's plenty of legal precedent for courts to look at the core issue of how a local official decides whether an action is constitutional.

The case is one of several nationwide that have put county clerks in a legal spotlight of late and harkens back to initial efforts in California nearly a decade ago to push for same-sex marriage.

San Francisco Mayor Gavin Newsom directed clerks to issue same-sex marriage licenses in 2004, citing the state constitution's equal protection clause. His order came months after Massachusetts' Supreme Court legalized gay marriage in that state.

However, California's high court stopped the practice a month later after about 4,000 same-sex licenses had been given out. The court reversed itself in 2008, legalizing gay marriage, but voters the following year approved Proposition 8, which banned the unions.

In the latest twist, the U.S. Supreme Court this year let stand a lower-court ruling that struck down Proposition 8 as unconstitutional. And the California Supreme Court followed suit in August, refusing to block gay marriages.

In New Mexico in the past week or so, hundreds of same-sex marriage licenses were issued after a county clerk along the U.S.-Mexico border concluded that state law didn't prevent him from issuing licenses. So far, clerks in six counties have begun issuing licenses, and a seventh has been ordered to do the same.

In the Pennsylvania case, "there's a great deal at stake," said Michael Geer, president of the Pennsylvania Family Institute, which advocates for conservative social policies. "The biggest issue is whether or not our public officials, whether local or statewide, will obey the law and follow the oath that they took when sworn into office."

Ted Martin, executive director of Equality Pennsylvania, which advocates on behalf of lesbian, gay, bisexual and transgender people, said Hanes' decision and the resulting case have brought attention to and encouraged discussion about ways such people are treated differently.

If Hanes wins in court, Martin said, "the ramifications would be pretty remarkable. I think Pennsylvania legislators would have to look long and hard about what's out there. It would be pretty interesting, at least."

Commonwealth Court has told the lawyers to address whether the judges have jurisdiction given Hanes' status as a judicial officer; whether handing out marriage licenses amounts to a judicial act; and whether the constitutionality of the state marriage law is a defense in the case.