By Tony Romeo, Jenn Bernstein

HARRISBURG, Pa. (CBS) — A Pennsylvania judge today ordered the registrar of wills in Montgomery County to stop issuing marriage licenses to same-sex couples.

Without addressing the issue of the constitutionality of Pennsylvania’s ban on same-sex marriages, Judge Dante Pellegrini ruled that Montgomery County registrar of wills D. Bruce Hanes was acting outside his powers when he granted licenses to same-sex applicants, in defiance of state law (see related story).

In his ruling today in Commonwealth Court, the judge said that Hanes has “admittedly failed to comply with his mandatory ministerial public duty” under the marriage law.

The opinion goes on to say that even if Hanes is correct in his view that portions of the Pennsylvania marriage law are unconstitutional, the proper response is for aggrieved parties to bring an appropriate court action to challenge the law.

Hanes expressed disappointment in the court’s decision, issuing a statement saying in part,

“… I will be reviewing the decision with county solicitor Ray McGarry and my solicitor Michael Clark to discuss with them next steps, including the possibility of appeal. In the meantime, I will fully comply with the Court’s order.”

County Commissioners Leslie Richards and Chairman Josh Shapiro say they are standing behind the county’s register of wills.

“We are disappointed in the court’s decisions but we also recognize it is a long legal process and it is one that we’re going to see through,” said Shapiro.

County Commissioner Bruce Castor says he’s not surprised by the ruling.

“The ruling was clear from the beginning that we could never have a situation where an executive official can pick and choose which laws to enforce,” said Castor.

The State’s General Counsel also issued a statement about the judge’s decision, saying in part,

“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.’’

Hanes issued four more licenses to same-sex couples on Wednesday, bringing the total number to 174.

The Corbett administration took him to court after he began issuing them in July (see related story). That was after the US Supreme Court threw out portions of the federal Defense of Marriage Act (related story) and state attorney general Kathleen Kane called the Pennsylvania ban on same-sex marriage unconstitutional (related story).