Four women were targeted by a sex offender as they walked towards Inverkeithing railway station on their way to work in the morning.
Daniel King lay in wait and performed sex acts in front of four women in the space of an hour.
King, 27, of Fraser Avenue, Inverkeithing, admitted four offences of intentionally engaging in sexual activity in the presence of the females.
At Dunfermline Sheriff Court, King was jailed for 200 days and placed on the sex offenders register for 10 years.
The offences took place in Boreland Road, next to the station on the morning of August 28 last year.
In the first case at 6am, he spoke to a woman to attract her attention and having done so exposed himself to her.
Depute fiscal Azrah Yousaf said that as the woman passed King she became aware of what he was doing.
She kept walking, caught her train and contacted the police once she got to work.
At 6.30am King repeatedly spoke to another woman to attract her attention and touched himself under his clothing. The woman heard him saying ‘excuse me, excuse me’ and when she saw what he was doing, she ran to the platform and again phoned the police from her work.
At 6.50am, King struck again, attracting a third woman’s attention. Another woman fell victim 10 minutes later when King grabbed her handbag to get her attention and again exposed and touched himself. The woman was so upset she could not go to work and instead went home.
Defence agent Peter O’Neill said his client suffered from depression and severe anxiety. He had been buying drugs on the street and had taken diazepam before the offence.
However, he said his client could not remember the incidents.
“He was quite shocked and astonished at what was alleged but he accepted the evidence was overwhelming,” said Mr O’Neill.
His actions that day had been “out of character”.