Maryland Senate President Thomas V. Mike Miller, Gov. Martin O'Malley… (Alex Wong, Getty Images )
Reporting from Washington — Cheers rang out in the marble hallway of the Maryland State House as Gov. Martin O'Malley signed a gay marriage law, before handing off the pens to gay members of the General Assembly gathered around him.
"For a free and diverse people, for a people of many faiths, for a people committed to the principle of religious freedom, the way forward is always found for the greater respect of the equal rights of all, for the human dignity of all," the Democratic governor said before signing the law.
The legislation narrowly passed the House of Delegates on Feb. 17 and the Senate less than a week later, and now faces challenge by opponents who want to put the issue to a public vote in November. If that challenge fails, the law will take effect Jan. 1, 2013.
In February, Washington Gov. Chris Gregoire, a Democrat, signed a law legalizing same-sex marriage there, and opponents plan to challenge that measure at the ballot box as well.
Lawmakers in New Jersey also passed a gay marriage law last month, only to have Republican Gov. Chris Christie veto it.
In Maryland, after a similar measure died in the House of Delegates last year, O'Malley announced in July his intention to sponsor a new law. This year's bill includes protections for churches and other religious institutions, allowing them to opt out of holding gay weddings.
Maryland Marriage Alliance, a coalition of religious groups, is leading the campaign to overturn the law.
The organization is gathering petition signatures, the first step in the referendum process. The organization is linked to the powerful National Organization for Marriage, a group formed to fight for California's Proposition 8 ban on same-sex unions.
"It is clear that while the opponents of marriage have been seeking influence from an elite group of politicians and supporters, the average citizens of Maryland continue to believe in the time-tested, unalterable definition of marriage," Derek McCoy, executive director of Maryland Marriage Alliance, said in a statement this week.
Marylanders for Marriage Equality, a coalition that backs same-sex marriage, expects efforts to get the referendum on the ballot to succeed and is mounting a campaign to uphold the law.