BOSTON
— The clearest message to come out of the historic vote here on gay marriage is, perhaps, the almost complete lack of clarity with which lawmakers and the broader public now confront one of the most contentious issues in American life.

After three constitutional conventions in which state lawmakers have grappled with the legality of gay marriage, the debate here in Massachusetts has become a sort of litmus test for the entire nation.

The amendment ultimately passed by the legislature shows a state, if not a nation, locked in ambivalence. By making gay marriage unconstitutional, this legislature showed that, even among one of the most liberal collection of lawmakers in the country, gay marriage is politically infeasible.

Yet in legalizing civil unions, an institution virtually identical with marriage except in name, the legislature here has gone further in securing rights for gay couples than could have been imagined six months ago, when the state had not adopted even rudimentary spousal legal rights.

Procedurally, the issue is equally complex: The legislature must again adopt the amendment next year, and the public must vote on it, even after the state permits gay marriages for the next two years in recognition of a court order.

The intensity and visibility of the dispute in Massachusetts has been a catalyst for political posturing and legislative gambits across the country, both in favor and against gay marriage.

Dozens of constitutional amendments restricting gay marriage have been put forward since the Massachusetts Supreme Judicial Court legalized gay marriage last year, even as half a dozen cities and towns have begun performing the ceremonies without legal authority.

But the ambiguity of the Massachusetts decision, and public opinion overall, show that rather than coming to a head in elections this November, the gay marriage debate will likely be a decade-long struggle.

"What this suggests is a long, protracted battle that could go on for a very long time as each state comes to grip with the issue," says John Green, a political scientist at the University of Akron in Ohio.

Though few parties involved with the amendment were satisfied with its final wording, the action by the legislature here could set an important precedent for other states. Massachusetts, say experts, has carved out a successful if rough path in which other states may now address gay marriage.

"People might see that individual states like Massachusetts can deal with this in their own way," says Alan Abramowitz, a political scientist at Emory University in Atlanta.

Despite the Massachusetts legislature's passage of an amendment, after two previous conventions deadlocked, the general tone among advocates on both sides of the issue here is disappointment.

The leaders of both legislative branches here had initially called for a ban of gay marriage. What they got was a compromise, which granted gays virtually all the rights of marriage without using the label. "[These legislators] are a bunch of wimps," says Laurie Latourneau, president of Massachusetts Voices for Traditional Marriage.

Yet gay advocates are even less satisfied. "Today, fear and prejudice won out over courage and over decency," said Arline Isaacson of the Massachusetts Gay and Lesbian Political Caucus.

In other words, the battles will continue. Gov. Mitt Romney (R) has already said he would ask for a stay of the Supreme Judicial Court's earlier order for marriages among gay couples to be permitted beginning May 17. The state's attorney general, Thomas Reilly, says he will abide by the court's decision.

Both sides clearly hope that as gay marriages are performed over the next two years, public opinion will move closer to their own viewpoint. The wait-and-see attitude, say experts, shows that the public's stance on gay marriage is very fluid.

"If someone a year ago had said a mayor is going to marry [gay people] no one would have believed you," says E.J. Graff, author of "What Is Marriage For?"

Where the public stands

In California, for example, 50 percent of the public now supports gay marriage - a five percent jump since 1997. And while most surveys show that the majority of Americans oppose gay marriage, even legislatures in states known for their social conservatism have failed to impose gay-marriage bans.

In Georgia, lawmakers last month failed to enact a ban on gay marriage. The legislature will take up another vote Wednesday.

But the very nature of American federalism, in which states approach legislation in their own way, means that the nation's legal confrontation with gay marriage will be drawn out. "Each state has their own procedure for amending constitutions. In some constitutions, it can be as easy as passing a law," says Mr. Abramowitz.