Commonwealth Court Judge Dan Pellegrini said Montgomery County Register of Wills D. Bruce Hanes did not have the power to decide on his own whether Pennsylvania’s same-sex marriage ban violates the state constitution.

Matt Rourke, APMarcus Saitschenko, left, and James Goldstein obtain a marriage license at a Montgomery County office on July 24, 2013.

“Unless and until either the General Assembly repeals or suspends the Marriage Law provisions or a court of competent jurisdiction orders that the law is not to be obeyed or enforced, the Marriage Law in its entirety is to be obeyed and enforced by all commonwealth public officials,” Pellegrini wrote.

It was not immediately clear what the decision would mean to those who have already received a license.

The state Health Department under Republican Gov. Tom Corbett sued Hanes after he began issuing licenses to same-sex couples in July, despite a 1996 state law that defines mar riage as between a man and a woman. The department argued that Hanes’ actions could create chaos.

James Schultz, Corbett’s general counsel, issued a statement saying the key issue was whether local officials can decide which laws to uphold or reject, based on their personal legal opinion.

“We respect the interests and dignity of all the parties involved in this case, but we are a government of laws and it is important that all office holders across the state enforce those laws uniformly,” Schultz said.

A Montgomery County spokesman said the ruling was being analyzed and they planned to comment later Thursday.

A lawyer for some of the same-sex couples who obtained licenses from Hanes, Robert Heim, said Pellegrini said the legality of the licenses was not an issue before him.

“The 32 couples that I represent are going to have to decide whether they also want to litigate it in the Commonwealth Court, since Judge Pellegrini virtually invited it,” Heim said.

In his opinion, Pellegrini said “there are no obstacles preventing those adversely affected by the provisions of the Marriage Law,” such as the 32 couples, “from asserting their own rights in an appropriate forum,” and he cited the pending federal lawsuit as an example.

Hanes, a Democrat and an elected official whose duties include marriage licenses, said the law conflicts with his constitutional obligations. His actions followed the U.S. Supreme Court‘s decision to throw out part of the federal Defense of Marriage Act, and a statement by Pennsylvania Attorney General Kathleen Kane that the same-sex marriage ban was unconstitutional.

Kane is not defending the federal challenge to the same-sex marriage ban, having turned over that case and the Hanes matter to Corbett’s lawyers.

ACLU of Pennsylvania attorney Vic Walczak said Pellegrini’s decision wil l have no impact on the federal case.

Pellegrini wrote that only courts have the power to determine if a statute is unconstitutional.

“In this case a clerk of courts has not been given the discretion to decide that a law … he or she is charged to enforce is a good idea or a bad one, constitutional or not,” the judge wrote. “Only courts have the power to make that decision.”

Marcus Saitschenko of Philadelphia, who with his partner was among the first to obtain a license from the clerk, said he has faith in the legislative and judicial process.

“I’m confident that we will have marriage equality in Pennsylvania soon,” Saitschenko wrote in an email Thursday. “When my partner and I are legally able to be married in our home state, we will do so.”

Pennsylvania is the only northeastern state that does not grant legal status to marriage or civil unions between individuals of the same s ex. Hanes has issued 174 licenses to same-sex couples.

A similar scenario is playing out in New Mexico, where a county clerk concluded the law did not prevent him from issuing same-sex licenses, and about a half-dozen others in that state have followed suit.