(AP) - Gay marriage is all but legalized in Maryland after the legislature gave its final OK Thursday to the law that's being sent to Gov. Martin O'Malley, who said he expects to sign it sometime this week. Maryland will become the eighth state to allow gay marriage when O'Malley - who sponsored the bill - signs the legislation. The Democrat made the measure a priority this session after it stalled last year. "This issue has taken a lot of energy, as well it should, and I'm very proud of the House of Delegates and also the Senate for resolving this issue on the side of human dignity, and I look forward to signing the bill," O'Malley said in a brief interview after the Senate vote. Some churches and clergy members have spoken out against the bill, saying it threatens religious freedoms and violates their tradition of defining marriage as between a man and a woman. "The enormous public outcry that this legislation has generated - voiced by Marylanders that span political, racial, social and religious backgrounds - demonstrates a clear need to take this issue to a vote of the people," Maryland Catholic Conference spokeswoman Kathy Dempsey said in a statement. Every time this issue has been brought to a statewide vote, the people have upheld traditional marriage. Leaders at the Human Rights Campaign, a group that joined a coalition of organizations to advocate for the bill, said they expect opponents will gather the required number of signatures. "There remains a lot of work to do between now and November to make marriage equality a reality in Maryland," Joe Solmonese, HRC president said in a statement released Thursday. 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. Sen. Allan Kittleman, the only Senate Republican to vote in favor of the legislation, said he is proud of his decision and not concerned about political consequences down the road. "You don't worry about politics when you're dealing with the civil rights issue of your generation," said Kittleman, R-Howard, the son of the late Sen. Robert Kittleman, who was known for civil rights advocacy. Christy and Marie Neff, who married in Washington, D.C., where same-sex marriage has been legal since 2010, stood outside the Senate chamber Thursday evening as crowds surrounded O'Malley and other key supporters. The couple, who lives in Annapolis, has lobbied lawmakers to support the bill in recent years. "This is our victory and we're going to savor this because you can only really jump one hurdle at a time," Christy Neff said. So we're going to savor this and then if they bring it to referendum, we'll match that effort with the same sort of effort we did today. Associated Press Writer Brian Witte contributed to this story.