There’s an emerging threat hanging over the heads of school bullies: a new law aimed at stopping cyberbullying will force schoolchildren to hand over their Facebook passwords.

A controversial measure, which came into effect on 1 January in Illinois, insists that students must open up their social media accounts if a school has reasonable cause to believe that a student has violated a school’s policy on social media, even if the post in question appears after school hours.

The measure arrives as cyberbullying is on the rise, but also at a time when other US states have passed legislation expressly forbidding schools from invading students’ privacy on social media.

Some Illinois parents have already expressed concern after receiving letters from school districts informing them about the new rules. “It’s one thing for me to take my child’s social media account and open it up, or for the teacher to look or even a child to pull up their social media account,” Sara Bozarth told Fox News affiliate KTIV, “but to have to hand over your password and personal information is not acceptable to me.”

Leigh Lewis, school district superintendent for Triad Community Schools in Troy, Illinois, said media reports about the new rules had “taken the letter out of context and created an unnecessary controversy”.

She said a recent change in Illinois law required all school districts to investigate all instances of cyberbullying, regardless of where the incident had taken place.

In addition, she said that last year Illinois passed a statute authorizing school districts to obtain social media passwords from students when there is evidence that a student used social networking to violate a school rule or policy. Parents must also be informed that the school wants access to their child’s account.

Lewis said no children had yet been asked for their passwords. “In situations where we need to access social media, students will bring them [potential abuses] to the attention of administrators,” she said.

Forty-nine states in the US have anti-bullying legislation. Iowa governor Terry Branstad proposed the Bully Free Iowa Act earlier this year and announced the state was conducting a study of cyberbullying in 400 middle schools.

However, at least 13 states have legislation that expressly forbids employers, schools or both from demanding passwords to social media accounts. Last March a Minnesota school was forced to pay $70,000 to settle a case brought by a 15-year-old girl who was forced to hand over her Facebook password after venting about an adult hall monitor on the social network.