THE FAILURE of the same-sex marriage bill in Annapolis is a bitter defeat for advocates, who had hoped Maryland would become the sixth state, not counting the District, to enact such legislation. It’s also a useful reminder, if one were needed, that despite the ongoing revolution of attitudes toward gay marriage nationally, broad acceptance remains a work in progress and the unconvinced retain the upper hand.

That may seem obvious now. But it was just a few weeks ago that opponents of gay marriage seemed quiescent in the Free State. After bitter public debate, the Maryland Senate, long seen as the more conservative half of the legislature, passed the bill by a 25 to 21 vote, setting the stage for what was presumed to be a similar, if narrow, victory in the House of Delegates.

The bill’s passage in the Senate aroused the passions of a formidable coalition of the unwilling — Republicans, churchgoing African Americans and the Catholic Church — for whom any marriage not between a man and a woman remains anathema. Their ardent stance struck fear into the hearts of fence-sitters in the House, including, incredibly, some lawmakers who had signed on as sponsors of the gay-marriage bill — perhaps not expecting they’d ever have to cast a vote for it.

In the end, a few votes shy of a majority, advocates of the bill tabled it rather than risk more defections — and a defeat on the House floor that might prove a damaging precedent for the legislation’s prospects in Maryland and elsewhere.

It’s probably a pipe dream to hope for stiff-spined legislators who take principled stands on issues and stick to them, even at peril to their reelection prospects. Advocates now seem to believe that the better strategy is to cultivate grass-roots support, perhaps by means of a more aggressive and better-targeted PR campaign than they have conducted so far. They say they’ll try again for legislation in Annapolis next year. Here’s hoping they prevail.

The trend in public opinion continues in favor of equal rights for gays in general and same-sex marriage in particular. Those in favor are younger and better-educated Americans; those opposed skew heavily older and less-educated. Political independents, who were heavily opposed just two years ago, have swung sharply toward acceptance. The direction of the debate seems clear enough; the pace is frustrating.