The governor of Kentucky recently signed legislation that could give religious students free rein to discriminate in public schools.

Senate Bill 17, signed Gov. Matt Bevin (R-Ky.) on March 16, permits a wide range of religious activities in the state’s public schools and restricts interference from staff and school boards. The new law will allow students to “voluntarily express religious or political viewpoints in school assignments” and gives religious and political student organizations full control of their internal affairs.

Critics say the bill, which reportedly stems from a 2015 decision to remove Christian references from a student production of “A Charlie Brown Christmas,” could be used to discriminate against LGBTQ students.

“No student should fear being excluded from a school club or participating in a school activity because they are LGBTQ,” Sarah Warbelow, legal director for the Human Rights Campaign, said in a statement. “While of course private groups should have the freedom to express religious viewpoints, they should not be able to unfairly discriminate with taxpayer funds.”

Chris Hartman, director of Kentucky-based LGBTQ advocacy organization Fairness Campaign, told The Washington Blade he was “disappointed in this new law that can potentially further marginalize LGBT students across Kentucky.”

Bevin’s office did not immediately respond to a request for comment.

SB17 also ensures that religious groups are allowed equal access to public forums and permits “public schools to sponsor artistic or theatrical programs that advance students’ knowledge of society’s cultural and religious heritage.”

Under the law, students are allowed to display religious messages on their clothing and use public school facilities for religious activities. The legislation also permits teachers to use biblical texts in their instruction.

The bill was introduced in the state senate in January and passed the Senate and House by votes of 31-3 and 81-8, respectively. With Bevin’s signature, the law will take effect beginning July 1, according to WFPL.

Human Rights Campaign is currently tracking anti-LGBTQ legislation introduced in states across the country. In January, Rep. Rick Nelson (D-Ky.) introduced to the Kentucky Senate House Bills 105 and 106, which critics say are aimed to discriminate against members of the LGBTQ community. House Bill 105 says no law or court action may interfere with a person exercising their rights, including the “right of conscience.” Such laws have in the past been used to justify denying certain goods and services to LGBTQ individuals.

Nelson’s House Bill 106 would require public schools, state universities, and government buildings to designate that their bathrooms may “only be used by persons based on their biological sex.” Both bills are currently under review by the state judiciary.