Dylan O’Connor donned a balaclava to invade the flat but left his fingerprints on the door of the house after taking a cocktail of drink and drugs.

A judge told O’Connor, 19, at the High Court in Edinburgh: “You have pled guilty to a most serious offence and I find the account which you gave of your participation in that offence to be highly suspicious.” Lord Turnbull told the youth that he was prepared to take into account that he was aged 18 at the time and he did not have previous convictions before sentencing him to detention.

O’Connor, formerly of Morar Drive, Paisley, claimed to police during an interview that he had gone to the house with two males who were unknown to him and he had been pressurised into taking part in the offence. He said he had a knife and was wearing a balaclava and clothing provided to him which he had returned before parting company with the others without getting any cash from the robbery.

He earlier admitted assaulting and robbing Bryan Hopkins and Lindsay Kelly at a house in Elm Drive, Johnstone, on July 19 last year while acting with others.

During the attack Mr Hopkins was sprayed with an unknown liquid leaving his eyes watering and burning and was struck on the cheek with a knife.

The court heard that the victims heard a noise at the door and when Mr Hopkins went to investigate he was confronted by two men wearing balaclavas.

He was sprayed with the substance and tried to push the door closed when an arm came round the door holding a knife and he was hit with the point of the weapon, causing a graze. He backed into the living room where his girlfriend was screaming hysterically. Her eyes were streaming as if she had been sprayed with pepper spray.

Three masked men came into the room and shouted “Where’s the money?” Mr Hopkins threw a wallet to the floor and one of the intruders took cash.

Miss Kelly was told to drop a phone she was holding and one of the robbers smashed it with a hammer.

The intruders searched other rooms and also smashed a Playstation before leaving.

Neighbours heard Miss Kelly scream and saw three men run from the close and get into a car before driving off.

They got away with £70 and caused damage worth £200. The perpetrators were not identified at the time but O’Connor’s fingerprints were found after lifts were taken from the outside of the front door.

Tyre fitter O’Connor was detained and initially denied any involvement but then admitted he took part in the robbery. He said he was heavily intoxicated with drink and drugs.

Defence solicitor advocate Christopher McKenna said: “He is unable to recollect the precise details of what happened or to explain how he became involved.” He said it must have been “a truly terrifying experience” for the victims and O’Connor deeply regretted the trauma caused.

“It involved the invasion of the complainers’ home, somewhere they were entitled to feel safe,” he said.

Mr McKenna said O’Connor’s partner was pregnant and he hoped to be “a good role model” for the child.

Speaking after O’Connor was sentenced to 44 months, Inspector Steven Espie, who is based at Johnstone Police Office described the incident as “violent and traumatic”.

He added: “The use of weapons by the assailants made this a particularly violent crime which resulted in an extensive police investigation to identify those involved. I particularly welcome the sentencing as an indication of the seriousness of the offence and to act as a deterrent to others.

“This sentence will also remove a violent individual from our communities making them a safer place for all. Police Scotland will continue to deploy all available resources to investigate such offences ensuring there is no hiding place for violent criminals in our community.”