North Carolina recently passed a law forcing people to use bathrooms that correspond to their “biological sex,” which must be either male or female. Many U.S. government officials, including U.S. President Barack Obama and Attorney General Loretta Lynch, and celebrities, including Itzhak Perlman, Bruce Springsteen, and Ringo Starr, have publicly opposed the law because it discriminates against transgender and gender-nonconforming people, who may not fit into a male-female binary of gender or sexual identity.

Jewish leaders have also voiced their opposition to the law. In an open letter, more than 40 rabbis from North Carolina condemned it, saying, “The Torah teaches that all human beings are created in the image of God and imbued with infinite value. In that spirit, we declare that our state should, under no circumstance, desecrate the holiness and dignity of any citizen.”

While their rejection of the law is welcome – and surely appreciated not only by the LGBTQ community but also by many progressive Jews who support their rights – the sole biblical source these rabbis cite to justify their position is problematic. Not least because this exact same verse is used by proponents of the law, albeit in a slightly different way.

The Torah verse the letter refers to is the first half of Genesis 1:27, which states: “So God created humankind in God’s image, in the image of God, God created humankind” In isolation, these words support the position that people should be treated with respect regardless of their gender presentation, or any other characteristics (rabbis have cited the verse’s assertion that people are created in the “image of God” to support many progressive causes ranging from universal human rights to marriage equality).

However, the verse continues: “God created them as male and female.” This segment complicates the text’s implications for the North Carolina law, because it could be read to suggest that humankind is created in the divine image only insofar as it exists in gender binaries.

Indeed, a number of proponents of the law have cited this exact passage to support their position. Among them is Perry Noble, the pastor of a prominent megachurch, who wrote: “I am a Christian who believes God's Word," and cites the full passage of Genesis 1:27, adding: "The Bible is clear that God made man and God made woman. Even the way He created them was different.” Based on this verse, Noble concludes, “Scriptures compel me to believe the [North Carolina] law has merit.”

To make a more convincing argument, Jewish leaders could cite a range of other passages that run counter to North Carolina’s law. In fact, Jewish texts beyond Genesis 1:27 offer far more explicit guidance.

Judaism has long recognized that not every person falls into a male-female binary. Already 2,000 years ago, the early rabbis conceived of six different forms of gender identity. This alone undermines the fictional male-female “biological sex” divide imagined in North Carolina’s law.

More importantly, the very premise of forcibly dividing bathrooms based on a fictional binary is expressly anathema to Judaism. There is a traditional Jewish prohibition on unmarried men and women being alone together (yihud). At its core, yihud reflects concerns about avoiding inappropriate behavior in intimate spaces – the same concerns that underlie the law (avoiding yihud is actually the primary reason given for why men and women shouldn’t be in a bathroom at the same time: Shulhan Arukh, Even HaEzer 22:13). The rabbis considered yihud so egregious that they imposed lashes on anyone who violated it (Shulhan Arukh, Even HaEzer 22:2).

Yet, in discussing the prohibition against yihud, all of the major halakhic codes rule that someone whose gender identity doesn’t fall into the male-female binary may be alone either with men or with women without fear of any punishment (Maimonides, Mishneh Torah, Issurei Biah 22:11; Shulhan Arukh, Even HaEzer 22:12). The application of this rule to North Carolina’s law is clear: According to Judaism, people who don’t fit into gender binaries should not be punished for sharing intimate spaces – like bathrooms – with anyone.

Because much of the Jewish tradition has been oppressive of LGBTQ individuals, many liberal rabbis are hesitant to turn to texts that explicitly address issues of gender and sexuality. Instead, they cite broad ideas — like all people being created in the “image of God” — to support almost any progressive stance. While these concepts are poetic articulations of truths we should know from our moral intuition, they do not rigorously engage with the specific issues — like North Carolina’s law — that they are being used to discuss.

Engagement with the Jewish tradition involves bringing our modern views into conversation with those of thinkers from hundreds and thousands of years ago, regardless of whether we agree with them or not. No matter what conclusions we reach, we refine our thinking and morality in the process. Even if the tradition didn’t say what it does, we would still feel the North Carolina law is morally wrong. But in this case, 2,000 years of Jewish wisdom explicitly reinforce this moral position, and that should not be ignored.

Ayalon Eliach is a lawyer and a rabbinical student at Hebrew College. He holds a BA in Religious Studies from Yale University and a JD from Harvard Law School. He is passionate about using religion as a source of connection rather than separation in the world.