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 will have no impact on the federal case.
"It is full speed ahead for the ACLU lawsuit," Walczak said.
Pellegrini wrote 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 sex. 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.