A couple let a man brandishing a knife into their block of flats just moments after he threatened to kill them.
Andrew Cox had been making a noise outside Landsdowne Court in Dundee when the pair got out of bed and shouted at him to be quiet from their balcony.
An argument ensued, during which Cox screamed he would kill them while waving the knife.
He then demanded to know which flat they were in and rang their buzzer when they told him.
The couple let the 41-year old inside and he took the elevator to get to their floor and confronted them.
Depute fiscal Eilidh Robertson told Dundee Sheriff Court Cox challenged them again and threatened to kill them. He made a lunge towards the man but fell over, allowing his victim to close his door.
Ms Robertson added: “About five to 10 minutes later, he (Cox) came back with someone else, pushing the knife through the letterbox.”
Cox also smashed a glass panel on the door. Shards of glass fell inside the flat, cutting the man’s ankle.
It was at this point the police were called and he made off.
Cox, a prisoner at Perth, admitted acting in an abusive and threatening manner on June 4.
Defence solicitor Jim Lafferty said: “He accepts custody is inevitable in this case. It is quite clear from his record of offending that he has been in the revolving door (of prison).
“He’s had a number of months to think about his conduct.”
Sentence on Cox was deferred until October 26 for the preparation of reports. Sheriff Tom Hughes remanded him in custody in the meantime.