The Kerala High Court on Thursday remarked that in an ideal society, girls and women must be able to walk on the streets at any point of time of the day or night, reported Live Law.

It, however, said that for this to happen, adequate security systems would have to be ensured.

The High Court was hearing a petition filed by women students at the Kozhikode Medical College Hospital who had challenged a directive of the Higher Education Department that prevents them from leaving the hostel after 9.30 pm. The petitioners said that the directive does not apply to male students.

“Girl students have constitutional rights, perhaps even more than boys,” the High Court noted on Thursday, reported the Hindustan Times. “Discriminatory restrictions cannot be imposed on them like this. Hostels are not prisons.”

Justice Devan Ramachandran of the High Court confirmed an interim order that he had passed on December 20, under which hostel gates for both male and female students will have to be closed at 9.30 pm. The judge, however, said that if students want to leave the hostel after that time for a valid reason, they should not be stopped from doing so.

“There can be no doubt that the attempt to trample a young woman’s choices under the guise of protection will have to be frowned upon, but the question whether the hostels will have to be kept open unrestricted throughout the night and day is one in the policy realm in which this Court cannot speak affirmatively, though, can perhaps hope for in the future,” Ramachandran said, reported Live Law.

The judge said that society needs to change and infrastructure needs to be improved to make campuses and streets safe.