But when religious groups offer services to the wider public — such as adoption — they would have to include same-sex couples.

Opponents, many of whom said they would never support the underlying bill, said the amendments did not go far enough to protect those with religious objections to same-sex marriage.

Sen. E.J. Pipkin, an Eastern Shore Republican with a libertarian bent, said the state is moving unnecessarily quickly on same-sex marriage. He would have preferred that Maryland try civil unions first.

"This bill is complicated," Pipkin said. "This bill has major ramifications. … We are moving too far too fast."

An earlier effort to turn the legislation into a civil unions bill failed overwhelmingly in committee. Nobody offered the option as a floor amendment on Wednesday.

Sen. Bryan W. Simonaire, said the "journals of history" will record Feb. 24, 2011, "as the day traditional marriage died in Maryland."

The Anne Arundel County Republican said his "gravest concern" is that legalizing same-sex marriage would cause a decline in traditional marriages "as it loses its sanctity to many."

A possible unintended consequence, he said, was that schoolchildren in Maryland would be taught "the homosexual worldview."

His comments prompted Sen. Karen S. Montgomery to recall the dire predictions about how children would be affected when public schools were integrated.

"We are repeating old arguments and have to move on," the Montgomery County Democrat said.

Senators said they had heard opinions from constituents on both sides of the issue. Several noted that their districts strongly oppose the measure.

But Sen. Ron N. Young, a freshman Democrat from conservative Frederick County, said he has not been swayed by the opposition.

"There are times when you have to do what is right," Young said. "We are here not just be representatives, we are here to be leaders. If I lose an election over this vote, so what?"

Advocates on both sides reacted quickly.

"We are deeply disappointed in the members of the Senate who have made the irresponsible decision to dismantle our state's definition of marriage," said Kathy Dempsey, a spokeswoman for the Maryland Catholic Conference.

The gay-rights group Equality Maryland filled the Senate galleries with dozens of supporters to witness the final vote Thursday.

"It's a moment for all of us," said Executive Director Morgan Meneses-Sheets.

The spotlight now shifts to the House of Delegates.

On Friday, the House Judiciary Committee will hear testimony from supporters and advocates. A majority of the committee members are co-sponsors of the legislation, which all but ensures that it will be forwarded for consideration by the entire 141-member body.

Its fate on the House floor is uncertain, though chief sponsors and gay-rights activists said they are optimistic.