The Maryland Senate on Tuesday passed a civil rights bill that would prohibit discrimination against transgender people in employment, housing and public places such as hotels, restaurants, theaters and sports venues.

The bill, sponsored by Sen. Richard S. Madaleno Jr. (D-Montgomery), was the subject of low-key debate before its passage along party lines.

The legislation — called the Fairness for All Marylanders Act of 2014 — bans discrimination based on sexual orientation and sexual identity but includes an exemption for religious organizations, private clubs and educational institutions. It defines gender in terms of a person’s consistent and sincere expression of sexual identity based on appearance, expression or behavior, regardless of biological sex at birth.

Opponents raised concerns that sex offenders might take advantage of the law to steal into a bathroom of the opposite sex. Others warned that the law would subject people to embarrassing invasions of privacy from transgender people in locker rooms or restrooms.

Del. Neil C. Parrott (R-
Washington), who is chairman of, sent out a fundraising e-mail on behalf of the group warning of the possible consequences of enacting what he called the “bathroom bill.”

“The problem is you send your daughter into the bathroom, and you expect it’s going to be girls and women in the bathroom. And instead you find out there’s a 45-year-old man in the bathroom with them,” Parrott said in an interview. “It really goes against nature.”

But Sen. Jamie B. Raskin (D-Montgomery) said in an interview that the bill does not apply to private facilities designed for people of the same gender to disrobe — in other words, a locker room. He also dismissed opponents’ concerns about transgender people in public rest­rooms.

“People who are transgender do go to the bathroom now and it’s working out fine,” Raskin said in the floor debate.

The bill passed 32 to 15, with one Republican — Sen. Allan H. Kittleman (Howard) — voting in favor. Four Democrats — Sens. John C. Astle (Anne Arundel), James E. DeGrange Sr. (Anne Arundel), Roy P. Dyson (St. Mary’s) and James N. Mathias Jr. (Worcester) — voted nay.

The measure now goes to the House of Delegates, which passed a similar version of the bill in 2011.

At least 17 other states and the District have laws banning discrimination based on gender identity. Baltimore, Howard and Montgomery counties, along with the city of Baltimore, have also passed such measures. In 2007, Gov. Martin O’Malley (D) issued an executive order banning discrimination against transgender people in employment.

Madaleno’s bill contains exemptions for religious groups, educational institutions, private clubs, small businesses and ­owner-occupied rentals with five or fewer units.

But the Maryland Catholic Conference objected to the bill, citing concerns about its practical effects and redefining gender in a way that conflicts with biology.

“Such a distinction manifests a fundamental violation of our society’s basic understanding of the human person,” the conference said in written testimony.

But Kittleman said Howard County’s experience shows the fears are overblown.

“I worry that people think these terrible things are going to happen when they really aren’t,” Kittleman said. “I just hope people realize this is a fairness issue.”