A bill to broaden protections for LGBTQ people passed the Pennsylvania state House of Representatives on Tuesday — the first to advance this far after yearslong efforts by Democrats — though it faces strong headwinds in the Republican-controlled Senate.

The bill passed 102-98 in the House where Democrats have a razor-thin majority, becoming the first of its kind to see a floor vote. Gov. Josh Shapiro, a Democrat, said he supports it.

Similar legislation — long supported by LGBTQ advocates, and even a priority of former Gov. Tom Wolf — has failed to get a floor vote in either chamber, despite clearing committee years ago.

MICHIGAN SENATE VOTES TO ENSHRINE LGBTQ PROTECTIONS INTO STATE'S CIVIL RIGHTS LAW

Under the bill, it would be illegal to discriminate against LGBTQ people in housing, workplaces and public services.

The legislation would add the categories "sexual orientation, gender identity or expression" to a law that empowers the state Human Relations Commission to investigate complaints of discrimination because of someone’s race, sex, religion, age or disability. The commission can impose civil penalties, such as back pay or damages.

At least 22 other states have enacted similar laws, and Pennsylvania is the only state in the northeast without codifying these measures, according to data from the Human Rights Campaign.

Under governors friendly to anti-discrimination efforts, like Wolf and Shapiro, the Human Relations Commission has accepted complaints about LGBTQ discrimination. Recently a state panel voted to clarify several terms to broaden its oversight in the absence of legislative action.

Pennsylvania Fox News graphic

The Pennsylvania House of Representatives has passed a bill that would ban anti-LGBTQ discrimination in housing, employment and places of public accommodation.

The bill's sponsor, Rep. Malcolm Kenyatta, D-Philadelphia, said writing those legal protections into law will give them more security than what courts or the Human Relations Commission can guarantee.

Legislators debated the measure for about an hour on the floor, with opponents saying it would infringe on religious rights. But they also asserted the measure would force athletic teams to allow transgender athletes to play on teams that match their gender identity, use bathrooms that correspond to their gender identity or force doctors to perform sex changes — concerns that the bill’s maker repeatedly said are unfounded.

"Until this bill gets to the governor’s desk, there are going to be a lot of people who are going to lie about this legislation," an emotional Kenyatta said after the bill's passage. "They want to talk about everything but what was in the bill. But we’re not going to be distracted."

All but one Democrat supported it, while all but two Republicans opposed it.

Aaron Kaufer, R-Luzerne, said in support of the bill that he doesn't think it will the final version, especially once it gets to the Senate, "but I do think we need to advance the ball on this issue. I do think we need to better define, better protect, better clarify."

UNIVERSITY OF PITTSBURGH’S LGBTQ TASK FORCE MAKES DEMANDS, INCLUDING TRANS-INCLUSIVE HEALTH CARE, HOUSING

Still, opponents aired concerns that it could create new forms of discrimination.

"The more time that we spend focusing on our differences and enshrining them in our laws, simply highlights how we are in fact different. But we should be focused on what we have in common," said Rep. Bryan Cutler, R-Lancaster.

The bill has an uncertain future in the Senate, where Republicans hold a 28-22 majority. The chamber's Republican majority leaders for years have blocked such legislation, and the bill could be a test of Shapiro's ability to advance campaign goals in a divided Legislature early into his first term.

CLICK HERE TO GET THE FOX NEWS APP

In a memo to House members, the Pennsylvania Chamber of Business and Industry supported "the intent" of the effort, but took issue with practically enforcing certain protections afforded to "perceived" acts of discrimination.