By Holly Yan

OXFORD, ALA. (CNN) — Transgender people in Oxford, Alabama, could now face six months in jail for using restrooms labeled for the gender with which they identify.

The Oxford City Council passed the ordinance this week after the retail giant Target announced it would allow transgender employees and customers to use the restrooms they feel comfortable with. Target has a store in Oxford.

In the ordinance, the Council says people in public restrooms “do not reasonably expect to be exposed to individuals of the opposite sex while utilizing those facilities.”

“The Council further asserts that single sex public facilities are places of increased vulnerability and present the potential for crimes against individuals utilizing those facilities which may include, but not limited to, voyeurism, exhibitionism, molestation and assault and battery,” the ordinance states.

The law includes some exceptions, such as for adults accompanying children under age 12.

Those violating the ordinance could face six months in jail or a $500 fine.

Oxford Police Chief Bill Partridge did not return a CNN call for comment. But he told CNN affiliate WBRC the law would be enforced just like any other for a misdemeanor: A person would have to call police to complain, and when police arrive the officer would have to witness the crime.

After that, Partridge said, the person who called in the complaint would have to sign a warrant.

Oxford’s new law comes amid a spate of bathroom policies affecting transgender people across the country. But the ordinance does not explicitly mention the term “transgender.”

The Human Rights Campaign, which advocates for LGBT rights, lambasted the ordinance.

“This anti-transgender law is unprecedented in its establishment of criminal penalties for violations of the law, and raises a myriad of privacy and legal concerns, including questions about how the law will be enforced,” HRC said in a statement.

And the law could affect more people than some realize, HRC Alabama manager Eva Walton Kendrick said.

“Transgender people are our neighbors, our coworkers and our fellow churchgoers,” she said, “and every Alabamian has the right to live their lives without fear of discrimination and prejudice.”

The-CNN-Wire ™ & © 2016 Cable News Network, Inc., a Time Warner Company. All rights reserved.