SANTA FE — New Mexico's furious two-month debate over whether same-sex marriage is legal goes before the state Supreme Court on Wednesday morning.

The five justices agreed to hear the case after New Mexico's 33 counties asked for clarity on whether their clerks can issue marriage licenses to couples of the same gender.

One clerk, 76-year-old Lynn Ellins of Doña Ana County, made the decision on his own in August. An attorney, Ellins said nothing in New Mexico law prohibited same-sex couples from marrying.

He announced that he would issue licenses to gay couples that applied, and a flurry of same-sex weddings followed in southern New Mexico.

Two days after Ellins took his pioneering and controversial stand, a state district judge in Santa Fe ruled that the clerk in her county should issue marriage licenses to gay couples that requested them.

Then a judge in Bernalillo -- the state's most populous county -- ruled that gay marriage was lawful.

By the first week in September, Ellins had helped open a floodgate. Eight county clerks were issuing same-sex marriage licenses.

But other clerks either opposed gay marriage or said they were reluctant to issue licenses based on what judges had decided in other jurisdictions.

A ruling by the Supreme Court would establish a consistent state law instead of a system of differing policies, based on location.

Opposition to the wave of same-sex marriages has come from a contingent of Republican state legislators, led by Sen. Bill Sharer of Farmington.

Sharer said Ellins had legislated from a clerk's desk and that various district judges had ignored the full context of New Mexico law.

"It is inexplicable how a district court just discovered a new definition of marriage in our law, when our marriage law has not been changed in over a century," Sharer said after the first of the rulings.

The Supreme Court will allot 60 minutes for arguments. Six gay couples are listed as plaintiffs in the case. The defendants include the Bernalillo and Santa Fe clerks, even though they have issued marriage licenses to same-sex couples since district judges told them in August that the practice was legal.

Milan Simonich, Santa Fe Bureau chief of Texas-New Mexico Newspapers, can be reached at 505-820-6898. His blog is at nmcapitolreport.com.