The Fairness for All Marylanders Act, which passed the Senate, 32-15, now goes to the House of Delegates. The measure would expand Maryland's anti-discrimination laws to protect transgender people in employment, housing, access to credit and public accommodations.

Four localities — Baltimore City and Baltimore, Howard and Montgomery counties — already bar discrimination based on gender identity, but there is not a state law against it.

"I think we're ready to move ahead and be progressive," said Sen. Delores G. Kelly, a Baltimore County Democrat, who argued that transgender civil rights ought to be protected statewide.

There was no debate, though Sen. Bryan W. Simonaire, an Anne Arundel County Republican, questioned how the bill would affect access to bathrooms in a "mom-and-pop" restaurant or a school. Critics have attacked the measure as enabling "cross-dressers" to infiltrate women's bathrooms, but supporters say the bill was drafted to avoid abuse and that there have been no problems in those localities that already ensure transgender rights.

But Sen. Allan H. Kittleman, a Howard County Republican, spoke out in support, noting that there have been no complaints over the county's anti-discrimination law.

"I know people think these terrible things are happening, when they really aren't," he said.

Advocates praised the Senate passage.

"With their vote, 32 senators stood up to say no one should be denied the opportunity to work for a living, secure housing or eat lunch at a restaurant just because of their gender identity," said Carrie Evans of Equality Maryland.

If approved by the House, the legislation would make Maryland the 18th state to protect the rights of transgender people. A hearing on a House version of the bill is set for Wednesday in the Health and Government Operations Committee.

Opponents were seeking to rouse public sentiment against the measure as an invasion of privacy and potential threat to women and children. Del. Neil Parrott, a Washington County Republican, is circulating an online petition, saying the bill would "radically change our society and put our families and children at risk."