In a brief Wednesday, state attorneys said those marriage licenses were never valid, and compared gay and lesbian couples to "12-year-olds" who are also barred from marrying under state law.
The state Department of Health and Montgomery County Register of Wills D. Bruce Hanes will appear in Commonwealth Court next Wednesday to argue the case.
A 1996 law defines marriage as between a man and a woman. Hanes and his supporters argue that the law is unconstitutional and discriminatory.
Since July 24, Hanes has issued 154 marriage licenses to gay and lesbian couples.
Thirty-two of the couples have petitioned to intervene in the case, arguing that a ruling against Hanes could also invalidate their marriages.
The state filed a brief Wednesday opposing the couples' participation, arguing that their marriage licenses hold no "actual value or legitimacy" and thus have no right to be defended in court.