A plurality of American voters believe that people who are transgender should be permitted to choose which public restrooms to use, but a similar percentage say that state governments should not pass laws about the issue, according to a new NBC News/Wall Street Journal poll.

Forty percent of registered voters said that transgender people should be allowed to use the restroom of the gender with which they identify, while 31 percent said they should be legally prevented from doing so. Another 29 percent had no opinion.

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Still, respondents to the poll said they want state and federal policy-makers to stay out of the business of bathroom laws. Forty-nine percent said they opposed the intervention of the Department of Justice in a North Carolina state law involving prohibitions on transgender individuals using restrooms corresponding to their gender identity, compared to only 28 percent who supported the DOJ move.

That reluctance extends to state governments as well. Thirty-eight percent said that state governments should not pass any legislation regarding transgender people and restrooms. About one in five – 19 percent – want laws on the books that specifically allow transgender people to use restrooms of the gender with which they identify, while a similar percentage – 22 percent – say there should be laws prohibiting transgender people from using the facilities of their choice.

The data show a generational divide when it comes to transgender access to public restrooms. Over half of young voters – 53 percent – say that transgender people should be allowed to use the bathroom they choose, compared to only a third of seniors.

And, unsurprisingly, there’s an ideological split. Seventy-two percent of liberals support the notion of restroom choice for transgender people, compared to 41 percent of moderates and just 12 percent of self-described conservatives.

Nationwide, about four in ten voters – 39 percent - said that they personally know or work with someone who is transgender, while 59 percent said they do not. That’s up 10 points in the last year, when 29 percent said they personally know someone who is transgender, while 69 percent did not.

Young women (52 percent) and Hispanics (48 percent) are among those most likely to say they know a transgender person, while those least likely include seniors (26 percent) and Republican primary voters who identify as very conservative (26 percent.)