CHEYENNE, Wyo. (AP) — The state Senate has rejected a bill that would have prohibited teachers and school officials from prying into students' private personal social media accounts.

Senate File 14 failed on a 17-13 vote Friday.

Under the proposed bill, school officials would have to ask parents for access to a student's private social media account or cellphone.

Opponents argued the proposal would make it harder for school officials to keep schools and students safe.

Proponents contended that the legislation was needed to protect students from government intrusion into the private affairs of students and others.

The bill also addressed protecting data that has identifying information about individual students.