ANNAPOLIS, Md. -- Gov. Martin O’Malley on Thursday afternoon signed into law a historic bill that extends marriage rights to gay and lesbian couples, speaking on a theme of providing "human dignity for all."

Hundreds of supporters cheered as the Democratic governor signed the bill. It passed the Maryland Senate 25-22 and the House of Delegates 72-67.

Those opposed to equality have launched an effort to put a referendum on the November ballot, despite recent polling showing that a majority of Marylanders support marriage for straight as well as gay and lesbian couples.

The law will go into effect in January, allowing the referendum process to be completed, so Maryland potentially does not end up with a situation like in California, where about 18,000 gay and lesbian couples married during the window of time when marriage equality was legalized before Proposition 8 took away that right.

Unless undone by referendum, Maryland will join Connecticut, Iowa, Massachusetts, New Hampshire, New York, Vermont and the District of Columbia in legally recognizing marriage for gay and lesbian couples. Washington state lawmakers also approved marriage equality, and Gov. Christine Gregoire signed the bill that will allow gay and lesbian couples to wed in about three months. However, efforts are underway to call a referendum in November on the matter.

California, Delaware, Hawaii, Illinois, Nevada, New Jersey, Oregon and Rhode Island provide same-sex couples civil unions or domestic partnerships.

New Jersey's legislature recently approved a law granting marriage equality, but Republican Gov. Chris Christie, who harbors national political ambitions, vetoed the bill. New Jersey lawmakers have about a year to overturn that veto.

In California, a federal judge and an appeals court have ruled that Proposition 8 is unconstitutional, but the supporters of discrimination continue to appeal the rulings. It could be another year before the case moves forward.

The reaction

Equality supporters saluted Gov. O'Malley for bringing the marriage issue to the state legislature.

Human Rights Council President Joe Solmonese:

“The Governor’s signature today puts Maryland on the road to fairness for all families. This victory was possible thanks to the hard work of so many on the ground in Maryland. Our congratulations go to Governor O’Malley and our legislative allies who were incredible leaders in this effort.

“There remains a lot of work to do between now and an expected November referendum to make marriage equality a reality in Maryland,” Solmonese said. “Along with coalition partners, we look forward to educating and engaging voters about what this bill does: It strengthens all Maryland families and protects religious liberty.”

Lambda Legal Executive Director Kevin Cathcart:

"It's a great day for equality in Maryland. The state is indeed stronger today with marriage equality for same-sex couples and their families.

"This past month has been a momentous one for the LGBT community. From coast to coast -- in Washington, New Jersey and Maryland -- many elected officials are standing up for equality, and old-fashioned American values of fairness and common sense again have carried the day. People all across the country understand that marriage protects families, and that separate and unequal are not the American way.

"We congratulate our colleagues at Marylanders for Marriage Equality, who have worked tirelessly for this day. We also want to thank Governor O'Malley for his great leadership, and we are proud of the state legislators who voted for equality.

"Lambda Legal has been working towards marriage equality in Maryland for a long time. For years, we have defended out-of-state marriages of same-sex Maryland couples by winning recognition and benefits for police officers, school employees and other Marylanders."

Mike Thompson, Acting President of GLAAD:

"Step by step, we continue to draw closer to full equality for every American. Today's historic bill signing reflects the opinion of a growing majority of Americans who -- regardless of race, political affiliation and religion -- believe that every committed couple should be able to marry the person they love. Though opponents have already taken measures to deprive gay and lesbian Marylanders of the vital protections that only marriage can afford, we remain confident that, if asked, voters will echo Governor O'Malley's support for full equality."

National Center for Lesbian Rights Executive Director Kate Kendell:

“There is no doubt that 2012 is off to a firecracker start when it comes to tipping the scales in favor of full equality for our relationships and a future where the promise of justice for all is realized. Governor Martin O'Malley, like Washington Governor Chris Gregoire last month, has distinguished himself as a political leader who takes seriously his oath to uphold and defend the Constitution. We know we have farther to go before every LGBT person can live fully and freely, but today in Maryland our brothers and sisters can rest easier, knowing that their families are recognized and secure under the law."