PROVIDENCE, R.I. (AP) — Rhode Island is on a path to becoming the 10th state to allow gay and lesbian couples to marry after a landmark vote in the state’s Senate on Wednesday.

The Senate passed gay marriage legislation by a comfortable 26-12 margin, following a House vote of approval in January. The bill must now return to the House for a largely procedural vote, likely next week, but the celebration began Wednesday.

Hundreds of people filled the Statehouse with cheers following the vote.

“I grew up in Rhode Island and I’d like to retire in Rhode Island,” said Annie Silvia, 61, who now lives with her partner of 30 years just across the border in North Attleboro, Mass. “No. 10 is a nice round number, but I’d like it to be bigger. Fifty sounds good to me.”

Heavily Catholic Rhode Island is the last remaining New England state without gay marriage. Marriage legislation has been introduced in the state for nearly two decades, only to languish on the legislative agenda.

Supporters mounted a renewed push this year, and the Senate vote was seen as the critical test after the House easily passed the bill. Gov. Lincoln Chafee, an independent, called Wednesday’s vote historic.

“I’m very much looking forward to signing this,” he told The Associated Press as he congratulated supporters.

The first gay marriages in Rhode Island could take place Aug. 1, when the legislation would take effect. Civil unions would no longer be available to same-sex couples as of that date, though the state would continue to recognize existing civil unions. Lawmakers approved civil unions two years ago, though few couples have sought them.

Hundreds of opponents also gathered at the Statehouse for the vote, singing hymns and holding signs as the Senate deliberated. Rev. David Rodriguez, a Providence minister, said he was disappointed by the vote. He said he planned to continue to stand up for traditional marriage.

“Marriage between a man and a woman is what God wanted,” he said. “We will continue to do what we know how to do: Keep praying and preaching.”

The Roman Catholic Church was the bill’s most significant opponent. During the Senate’s emotional debate several senators said they struggled mightily, weighing their personal religious beliefs against stories they heard from gay constituents or their families.

Sen. Maryellen Goodwin, D-Providence, said she lost sleep over her vote but decided, despite opposition from the Catholic Church, to vote “on the side of love.”

“I’m a practicing Catholic. I’m proud to be a Catholic,” she said, adding that it was the personal stories of gays, lesbians and their families in her district who convinced her. “I struggled with this for days, for weeks. It’s certainly not an easy vote.”

Opponents to the bill tried unsuccessfully to send the question to the voters as a ballot referendum. After that failed, Sen. Harold Metts, D-Providence, told his colleagues that he couldn’t go against his religious convictions and that residents in his community are more concerned about other matters.

“My constituents are more concerned with bread-and-butter issues,” he said. “They want food on the table. They want their kids to get a good education.”

The Rhode Island legislation states that religious institutions may set their own rules regarding who is eligible to marry within the faith and specifies that no religious leader is obligated to officiate at any marriage ceremony and no religious group is required to provide facilities or services related to a gay marriage.

While ministers already cannot be forced to marry anyone, the exemption helped assuage some senators’ concerns and ease the bill’s passage this year.

Delaware could be the next state to approve gay marriage. Legislation legalizing same-sex marriage narrowly passed the Delaware House on Tuesday and now heads to that state’s Senate for consideration.

Two years after gay marriage legislation foundered in Rhode Island, supporters regrouped and this year mounted an aggressive and coordinated campaign that included organized labor, religious leaders, business owners and leaders including Chafee and Providence Mayor Angel Taveras.

The bill’s chances improved further when Senate President Teresa Paiva Weed said she would allow the bill to move forward, despite her opposition to gay marriage. The Newport Democrat voted no on Wednesday.

Earlier this week, the Senate’s five Republicans announced they would support the measure. Senate Minority Leader Dennis Algiere, R-Westerly, said the decision came down to core Republican principles.

“This is an issue of fairness, equality and civil rights,” Algiere said. “Those are our values, and we stand by them.”

House Speaker Gordon Fox, D-Providence, who is gay, had vowed to hold a vote on gay marriage early in the session. He said his chamber will hold a Tuesday hearing on the small changes made to the bill in the Senate. A final vote is tentatively scheduled for Thursday.

Rep. Frank Ferri, D-Warwick, who also is gay and lobbied for gay marriage before becoming a lawmaker himself, said it will be a vote to savor.

“After all these years, all these setbacks, all the hearings, we kept at it and we got closer and closer each year,” he said. “I’m pumped. I’m excited. I’m thrilled. It’s almost surreal.”