Gov. Mitt Romney said Sunday he would ask the state's highest court to order an anti-gay marriage amendment question onto the ballot if legislators fail to vote on the matter when they reconvene in January.

Romney said he would file a legal action this week asking a justice of the Supreme Judicial Court to direct the secretary of state to place the question on the ballot if lawmakers don't vote directly on the question on Jan. 2, the final day of the session.

Romney, an opponent of gay marriage who decided not to seek re-election as he considers running for president, made his announcement to the cheers of hundreds of gay marriage opponents at a rally on the Statehouse steps.

"The constitution quite plainly states that when a qualified petition is placed before them, the Legislature 'shall vote.' It does not say 'may vote,' or vote if procedures permit a vote, or vote if there are enough of the members in the chamber. It says, 'shall vote."' Romney said.

People in favor of gay marriage staged a protest across the street.

The Supreme Judicial Court ruled in November 2003 that such marriages were legal. Since then, more than 8,000 same-sex couples have tied the knot in the state.

More than 170,000 people had signed a petition in support of the ballot question, which would define marriage as between only a man and a woman.

Romney has criticized lawmakers since they voted 109-87 earlier this month refusing to take up the question during a joint session, voting instead to recess until Jan. 2 and all but killing the measure.

"The issue now before us is not whether same-sex couples should marry," Romney said. "The issue before us today is whether 109 legislators will follow the constitution."

Supporters of gay marriage defended the Nov. 9 procedural move.

"One of the tenets of the Constitution is that you do not put the rights of a minority up for a popularity contest," said Mark Solomon, campaign director of Mass Equality, a pro-gay marriage group. "It is one of the very principles this country was founded upon."

Solomon criticized Romney for holding a one-sided political event on Statehouse property.

"Gov. Romney is trying to divide Massachusetts and use this issue as a device to run for president," Solomon said.

Romney spokesman Eric Fehrnstrom said the governor conferred with the state Ethics Commission before staging the event in front of giant American flag hung from the Statehouse balcony while a sound system played John Philip Sousa's "Stars and Stripes Forever."

"This is a democracy rally, and the governor is trying to see that some lawmakers play their legislative role," Fehrnstrom said.

Because the Legislature is in recess and did not adjourn, Romney has no legal authority to call lawmakers back into session.

Spokesmen for Senate President Robert Travaglini and House Speaker Salvatore DiMasi did not immediately return a call Sunday.

The Legislature grappled with various efforts to ban same-sex marriages even before the high court ruling in 2003. Lawmakers refused to vote on a citizens' initiative in 2002, and two years later voted down their own proposed amendment that would have banned gay marriage and legalized civil unions.

In the November elections, amendments to ban gay marriage passed in Colorado, Idaho, South Carolina, South Dakota, Tennessee, Virginia and Wisconsin. Only Arizona defeated such an amendment.

Vermont and Connecticut have legalized civil unions that give same-sex couples benefits similar to marriage. New Jersey's highest court has ordered the Legislature to allow either marriage or civil unions for same-sex couples.