Right-wing extremists have a new way to foist their repulsive beliefs on us. After suffering a humiliating defeat in the Supreme Court in their battle against same-sex marriage, they have hit upon a formula designed to lure gullible Americans into believing that transgender people are sexual predators lurking in restrooms, eager to prey on the opposite sex. They have declared their first victory in North Carolina, where a wide-ranging so-called bathroom bill, HB2, was passed by the Republican-dominated Legislature during a special session and speedily signed into law by Republican Gov. Pat McCrory.

The innocuously named Public Facilities Privacy and Security Act blatantly overrides protections against transgender discrimination (and other forms) in cities and municipalities in North Carolina — specifically, the protections offered by a newly passed ordinance in the city of Charlotte that was to take effect Friday. The state bill is primarily designed to force transgender people to use public restrooms that match the gender on their birth certificates rather than their gender identity.

So far more than 20 states are considering variations of such bills. Among them is Michigan, which, one might imagine, has more urgent things to worry about (such as Flint’s poisoned water), and Kansas, which has gone further than others by adding a clause that would offer a $2,500 bounty to those who catch transgender people in prohibited restrooms. Mississippi even includes a section allowing homophobes to dictate how people can dress.

In an interview on “Rising Up With Sonali,” Mara Keisling, executive director of the National Center for Transgender Equality, explained to me that this wave of “bathroom bills” can be traced to the fact that “a lot of the right-wing extremist groups that were fighting marriage equality lost. And they have to continue to prove their relevance.” She added, “I think they thought transgender people were an easy target who nobody would stand up for.”

The history of restrooms and who gets to use them is fraught with controversy in the United States. It was not too long ago when black and brown Americans were forced to use separate facilities from whites. The idea that white Americans might be sullied if they came into contact with people of color during their most private moments offers a parallel to today’s fear-mongering against transgender people. “They’re trying to paint us as sexual predators,” said Keisling. She cited the familiar trope: “The ‘other’ is coming for your women and children,” which is often employed by those in power to rally support. “Donald Trump saying that Mexican immigrants are rapists is part of that horrid tradition,” she said.

Restrooms are touchy terrain in general. But for transgender people, according to Keisling, they are even more complicated, because “most people don’t understand what public restrooms mean for us. It isn’t just about convenience or even safety.” If a trans woman is not allowed to use a women’s restroom, she is essentially being told that her only option is to use the men’s restroom. But she can’t do that, because no woman, trans or otherwise, would feel comfortable in a men’s restroom. By using the men’s restroom, she would make everyone around her uncomfortable — and worse, she would jeopardize her own safety, given the level of violence aimed at transgender people. Ultimately it would mean she couldn’t use a restroom at work or school. In other words, she would become a second-class citizen, whose only option would be to limit her lifestyle. In a very concrete way, these “bathroom bills” dehumanize transgender people.

Most of the bills are aimed at public restrooms, affecting public schools and in turn hurting the most vulnerable among us: transgender children. “We hear about kids who won’t drink any fluids in the morning or all throughout the day because they don’t want to have to maybe use the bathroom at school,” Keisling said.

Already, transgender people are among the most marginalized in our society. It is estimated that one-third of 1 percent of Americans identify as transgender. A whopping 41 percent of them has attempted suicide. Also, transgender Americans are often the victims of violence. The year 2015 saw a sharp increase in the number of transgender homicides, leading some members of Congress to declare that there is an “epidemic of violence” against the community. Just days ago, a transgender woman on Los Angeles’ Skid Row, Kourtney Yochum, was fatally gunned down, allegedly by her former lover.

Other socio-economic indicators also point to a depressing reality. Poverty and homelessness are rampant among transgender Americans — Caitlyn Jenner is hardly representative of most members of the community in terms of wealth and stability. Transgender people also face disproportionate discrimination in access to housing, health care and employment.

For right-wing politicians to take such overt aim at a community that our society has so deeply failed is criminal. “Bathroom bills” would exacerbate the hostility that many transgender people already face. They would foster the general public’s impressions of criminal behavior by transgender people in restrooms. Keisling related a story of a friend who Googled incidents of transgender people preying on others in restrooms and only found “three Republican legislators who had been arrested for doing bad things in a bathroom.” Among them was former Republican Sen. Larry Craig, who was once arrested on charges of “engaging in lewd conduct” in a restroom. (Craig later pleaded guilty to a lesser charge.) Meanwhile, one report concluded that there are no known cases of transgender people assaulting others in a restroom.

In 2010, Max Blumenthal’s best-selling book “Republican Gomorrah” detailed a “bestiary of dysfunction, scandal, and crime from the heart of the movement that runs the Republican Party.” Some in that movement are now taking aim at transgender people. Perhaps they are projecting their own ugly thoughts of debauchery onto transgender people. Mike Huckabee, who dropped out of the current Republican presidential race, said in 2015 at a religious convention, “Now I wish that someone told me that when I was in high school that I could have felt like a woman when it came time to take showers in PE. I’m pretty sure that I would have found my feminine side and said, ‘Coach, I think I’d rather shower with the girls today.’ “

What is truly frightening is that the “bathroom bills” are creating a dangerous myth with no basis in reality, and some Americans are actually buying into the fear. Keisling shared that in North Carolina she met people who “really were convinced that the Charlotte City Council passed a law making it legal for male rapists to go into the women’s room and rape people.” One woman who testified at a hearing on such a bill in Maryland in 2014 said, “I don’t want men who think they are women in my bathrooms.” A 2014 poll found that a majority of Americans think transgender people should use restrooms corresponding with their biological sex at birth.

Republicans are obviously feeding on the public’s pervasive ignorance for political gains. Keisling cited the dismal fact that “only 20 percent of Americans actually know someone who is transgender.” It is harder to dehumanize people we know and whose humanity we face directly. As the marriage equality movement has shown, attitudes can and do change through concerted public awareness campaigns, and that kind of thing is desperately needed to protect the rights of transgender people.

Thankfully so far, the only state to legalize discrimination against transgender people by passing a “bathroom bill” is North Carolina. And that state is now facing an intense backlash from big business, including American Airlines (which has a major hub in Charlotte), Apple, Dow Chemical, PayPal and others. The state’s “single largest economic event,” an annual furniture expo, is threatened with failure because of massive cancellations prompted by the law. The state’s attorney general, Roy Cooper, called HB2 “an embarrassment” and has said he will refuse to defend it against legal challenges. Two transgender men have already filed a lawsuit against it. If North Carolina’s law is vociferously denounced and eventually overturned, it will send a strong message to other states that “bathroom bills” can be assumed dead on arrival in state legislatures.

Ultimately this struggle isn’t over bathrooms. It is over who gets to enjoy their constitutionally protected rights and be considered fully human.