A teenager followed a man and woman after they got off a train at Kirkcaldy railway station.
Lennon McAlpine (19) tried to grab a mobile phone from the woman and assaulted the man before stealing his belongings.
On Tuesday McAlpine, who was appearing from custody, had his sentence deferred for reports when he appeared at Kirkcaldy Sheriff Court.
He admitted that on March 14 at Kirkcaldy train station he attempted to steal a mobile phone from Rosie Talbot then at Balsusney Road he assaulted Luke MacDonald Taylor, repeatedly seized him by his rucksack, struggled with him and repeatedly struck him on the head with a stick, injuring him and robbed him of his wallet, rucksack and its contents.
He further admitted assaulting a police officer by pushing her and causing her to fall over, injuring her. All the offences were commited while he was on bail.
You may also be interested in:
The court heard that the two witnesses, who did not know each other, had arrived at the station around 8.25pm after travelling from Edinburgh.
As Miss Talbot walked through the tunnel underneath the train tracks she saw McAlpine, who was wearing a grey hooded tracksuit. She had headphones on and was carrying her mobile phone and she became aware of him walking behind her.
As she reached the end of the tunnel he attempted to snatch her phone from her but was unsuccessful as she had a good grip of it.
She shouted “What do you think you are doing?” and he ran off.
She contacted the police.
As Mr Taylor reached Balsusney Road he was aware of the accused behind him, walking faster as he did.
McAlpine approached him saying “Give me your stuff” and began pulling his rucksack. He got it off him and started striking him with a stick.
Mr Taylor gave him his wallet, but he continued to hit him and Mr Taylor ran back towards the train station.
He sustained cuts and bruising but did not require further treatment.
Police searching the area in an unmarked vehicle saw a man matching the description given to them and carrying a rucksack, coming from the side of flats in Balsusney Road.
They asked him where he had been and he said the train station.
As one officer approached him he lashed out, pushing her backwards and causing her to fall over.
He ran off but was chased and caught.
A search of the area uncovered a wooden pole with blood on it and other items which McAlpine claimed to have no knowledge of.
CCTV coverage at the station showed the accused following Miss Talbot into the tunnel.
Defence agent Mark Maguire said McAlpine knew he was going to receive a custodial sentence.
He said he had served a number of previous detentions, but nothing more than six months, and was currently serving a period of detention.
Sheriff Jamie Gilchrist deferred sentence on him until June 13 for reports. He was remanded in custody.