Access over the footbridge at a Surrey railway station is to close for two hours every night to protect the safety and security of passengers and staff.
It follows South West Trains reporting that Guildford station had one of the worst levels of crime on its network.
It said it believed that the 24-hour access of the station contributed to anti-social behaviour, vandalism, graffiti and security threats.
The council agreed the bridge should be closed from 0130 to 0330 GMT .
No trains run during this time, and South West Trains said its staff often had to face abuse from people who had missed the last train home and were told they could not sleep on the station premises.
"Many try to board terminated trains to use on-board toilets or to sleep," it said.
The company also said recent incidents had included intoxicated groups choosing to start fights on the station premises, and a group of people who vandalised and stole money from a toilet entrance machine.
It said the closure of the footbridge would allow staff to carry out security checks, and clean and prepare the station thoroughly before the first train was due out again at 0400 GMT.
The footbridge provides pedestrian access from Guildford Park Road into and through Guildford railway station to the Walnut Tree Close entrance to the station