A new WBUR poll (topline, crosstabs) out Thursday finds that a slim majority of Massachusetts voters do not want to repeal a 2016 state law that offers greater protections for transgender individuals in public accommodations.

It is very likely a challenge to the law, which supporters hail as legal protection against the discrimination of transgender people, will appear as a referendum question on the November ballot. The existing legislation allows transgender individuals to access public spaces, like restrooms and locker rooms, based on the gender with which they identify instead of their assigned anatomical sex.

According to the WBUR poll, 52 percent of voters oppose getting rid of the law, while 38 percent support its repeal.

Keep MA Safe, the group backing the repeal, has collected enough signatures to put the challenge through as a ballot question for this fall. The law, the group said, makes “whole segments of the population feel unsafe and exploits their privacy and security.”

On the other side, a group called Freedom For All Massachusetts has been leading the effort to prevent a repeal, saying "discrimination has no place in Massachusetts."

The fate of the law in Massachusetts, a traditionally deep blue state, could largely be seen as a test case for legislation related to transgender rights in other places through the U.S.

“If it were somehow to pass in Massachusetts, it would be very divisive across the country," said MassINC pollster Steve Koczela, who conducted the survey for WBUR, "and you would start to see these ballot questions popping up in a lot of other places."

The WBUR/MassINC poll has a 4.4 percent margin of error.