TWO teenagers received lengthy detention sentences this week for a "vicious and sustained attack" in Dunfermline town centre.

Their 39-year-old victim was punched and kicked and woke up in hospital with barely any recollection of the attack in Bruce Street.

But the assault was spotted by CCTV operators and his attackers were caught shortly after leaving the scene.

The two men made separate court appearances at Dunfermline Sheriff Court last Wednesday.

Kenneth Solway, 18, of Pittencrieff Street, Dunfermline, was sentenced to more than 16 months of detention while David Roberts, 19, of James Bank Hostel, was detained for six months.

Solway had earlier admitted that, while acting with another, he assaulted the man by pushing him, pulling him to the ground and thereafter repeatedly punching and kicking him on the head and body and repeatedly stamping on his head to his injury, and robbed him of his wallet and contents in Bruce Street on March 4.

Roberts admitted that, while acting with another, he assaulted the man and pushed him on the body, repeatedly kicked him on the body and repeatedly punched him on the body on March 4. The offence took place while he was on bail.

During Solway's court appearance, depute fiscal Kiran Uppal said the victim had been to a Dunfermline pub then to Life nightclub before making his way through Bruce Street, where he was involved in a confrontation between Solway and Roberts.

After being pushed to the ground, the victim was kicked and punched by the two men.

The attack appeared to be over when Roberts pulled Solway away from the victim, however, Solway then ran at the man and kicked at him before standing over him, patting him down and removing his wallet from his pocket.

During Roberts' court appearance, Ms Uppal said the victim was taken to hospital and found to have suffered a black left eye and some cuts and bruises to his cheek and his head.

Solway's defence solicitor, Alexander Flett, said his client – who had various health difficulties including ADHS and Aspergers Syndrome – had very little recollection of the incident.

"Clearly, there was an exchange of blows but he has no recollection," he said. "He doesn't seek to minimise responsibility – it is simply an explanation that he doesn't remember the incident in question."

Sheriff Charles McNair said Solway had punched, kicked then robbed a "completely defenceless" man. "He was lying on the ground and it is only by good fortune that this charge was not much more serious," he told him.

"It was a vicious and sustained attack which ended up as a robbery which appears to have been a casual after-thought."

Sheriff McNair detained Solway for 16 months for his part in the assault. He received a further 50 days detention for a charge – that he had behaved in an abusive and threatening manner in Pittencrieff Park on July 8, 2015 – to which he had previously pled guilty but had had sentence deferred for him to be of good behaviour.

Robert's defence agent said that although his client was involved, he had no part in the robbery and attempted to stop Solway carrying out further violence.

"He accepts he was very much involved at the start but, to his credit, he distanced himself and tried to stop the attack from going any further," he told the court. "He appears to genuinely regret his actions and feels ashamed of himself."

Sentencing him to a total of six months' detention, Sheriff McNair said that while he accepted Roberts wasn't involved in the most serious part of it, it was a "significant and serious" assault.