The US House of Representatives on Friday passed the Equality Act, a bill that would protect LGBTQ people from discrimination in housing, the workplace, public accommodations, and other settings.

The bill, first introduced in 2015, would also expand public accommodations protections to prohibit discrimination based on sex, and strengthen other existing protections in public accommodations — by, for instance, ensuring that retail stores and banks are covered.

The bill would address a remaining gap in civil rights laws: While there are already federal laws protecting people from discrimination based on race, religion, sex, and disability, there are no such federal laws explicitly protecting LGBTQ people from discrimination.

The Democratic-controlled House passed the legislation, but it faces tough odds in the Senate, which is controlled by Republicans who generally oppose expanding LGBTQ rights — making the bill very unlikely to become law.

Still, advocates are celebrating the moment because it’s the first time the legislation has received a full vote from either chamber of Congress. For them, it’s a sign of the progress LGBTQ rights have seen over the years, from greater social acceptance of LGBTQ people to the victory for marriage equality.

Most states don’t explicitly ban anti-LGBTQ discrimination

Under federal and most states’ laws, LGBTQ people aren’t explicitly protected from discrimination in the workplace, housing, or public accommodations (like restaurants, hotels, and other places that serve the public).

So someone can be fired from a job, evicted from a home, or kicked out of a business just because an employer, landlord, or business owner doesn’t approve of the person’s sexual orientation or gender identity.

Similarly, federal and most states’ laws don’t explicitly ban anti-LGBTQ discrimination in schools.

But federal and state laws do ban discrimination based on race, religion, nationality, and sex in the workplace, schools, and other settings. This is what the Civil Rights Act and other federal and state civil rights laws that followed were about.

With the Equality Act, lawmakers and activists hope to expand those existing civil rights protections to LGBTQ people.

Most Americans support protections for LGBTQ people

The Equality Act and other proposals like it are very popular among the American public.

According to surveys from the Public Religion Research Institute, a majority of people in every state support laws protecting LGBTQ people from discrimination in jobs, housing, and public accommodations. This applies even in the most conservative states, from South Carolina to Alabama to Mississippi.

PRRI found majority support across all sorts of different groups. About 79 percent of Democrats, 70 percent of independents, and 56 percent of Republicans say they favor the laws. A majority in every age group, from millennials to the elderly, supports the laws. Even a majority of white evangelical Protestants, who are typically conservative on LGBTQ issues, support the measures, along with every other religious group tracked by PRRI.

Republican lawmakers, however, continue to oppose the measures. They tend to frame the issue in religious rights terms, arguing that banning discrimination against LGBTQ people would prevent people from expressing their religious views about sexuality and gender. To that end, some Republican lawmakers have proposed a “compromise” bill that would build in exemptions for religious individuals and institutions.

For LGBTQ activists and allies, that kind of compromise is a nonstarter. They view exemptions for religious beliefs as huge loopholes for discrimination. As the advocacy group GLAAD said on Twitter, “We will NEVER compromise away the protections of every LGBTQ person from discrimination in order to satisfy those who wish to use religion as a weapon for discrimination.”

So despite vast public support, not much will likely get done in Congress on this issue anytime soon.

If Congress doesn’t act, the courts might

One avenue for action for the time being: the courts. Already, the US Supreme Court has taken some cases that will evaluate whether anti-LGBTQ discrimination is already banned under existing civil rights laws.

This gets to an argument that LGBTQ advocates have been making for years: In their view, federal law should already shield LGBTQ people from discrimination, because bans on sex discrimination should, they argue, also extend to discrimination based on sexual orientation and gender identity.

According to advocates, discrimination against people based on their sexual orientation or gender identity is fundamentally rooted in prohibited sex-based expectations. For example, if someone discriminates against a gay man, that’s largely based on the expectation that a man should only love or have sex with a woman — a belief built on the idea of what a person of a certain sex should be like.

Similarly, if someone discriminates against a trans woman, that’s largely based on the expectation that a person designated male at birth should identify as a man — again, a belief built on the idea of what a person of a certain sex assigned at birth should be like.

On the other side, opponents argue that LGBTQ nondiscrimination protections aren’t included in existing federal civil rights laws, because the authors of federal civil rights laws never believed or intended that bans on sex discrimination also ban discrimination based on sexual orientation and gender identity.

LGBTQ advocates, citing legal precedent, say that what the original laws’ authors believed or intended is irrelevant. Joshua Block, an attorney with the ACLU LGBT and HIV Project, cited a 1998 Supreme Court case, Oncale v. Sundowner Offshore Services Inc., in which the Court unanimously agreed that bans on sex discrimination prohibit same-sex sexual harassment. Same-sex sexual harassment was not something the authors of federal civil rights laws considered, but it’s something, the Supreme Court said, that a plain reading of the law protects.

“Oncale says that’s irrelevant whether [Congress] contemplated it,” Block previously told me. “This is literal sex discrimination. Whether or not that’s what Congress was focused on doesn’t make it any less a type of discrimination covered by the statute.”

Even if courts conclude that statutory bans on sex discrimination do ban discrimination based on sexual orientation and gender identity, under federal law that would only create explicit protections in the workplace, housing, and schools — but not public accommodations. That’s because federal civil rights laws don’t ban sex discrimination in public accommodations. That leaves a hole in nondiscrimination laws to be settled even if courts ultimately come down in favor of LGBTQ rights.

Ultimately, the courts, and the US Supreme Court in particular, will decide who’s on the right side of the law here.

In the meantime — and in case the courts don’t come down in their favor — advocates are pushing to get explicit protections for LGBTQ people into federal law. The House’s vote on Friday moved the country one step in that direction.