A man hid in his attic as a neighbour allegedly broke in, wrecked the flat and threatened to burn him out, the High Court has heard.
Prosecutors said the victim was so scared that he forced his head through the roof to shout for help from an intruder he claims previously broke his jaw.
Anthony Craig is accused of carrying out the raid and also a separate vehicle hijacking.
The 23-year-old, whose address was given as Barra Street in Antrim, was granted bail but banned from entering the town.
He denies charges of aggravated burglary, criminal damage, threats to kill, threats to damage property, hijacking, theft and other motoring offences over two incidents last year.
Crown lawyer Natalie Pinkerton said Craig allegedly smashed his way into the flat above him in the early hours of October 16.
The occupant woke in fear and climbed into his roof space to hide, where he claims to have heard the intruder trashing his home and demanding to know his whereabouts.
During an ordeal lasting up to 40 minutes the burglar allegedly warned the occupant that he would be burnt out and wouldn’t get out alive.
“He also stated he was going to take him to an area, strip him and do him in,” Ms Pinkerton said.
“The injured party said he was so frightened that he was able to remove slates from the roof, put his head through and shout for help.”
A television set and alcohol allegedly taken from the flat were later discovered during police searches of the area.
The victim claims to have identified Craig through a gap while hiding out in the attic.
He has also alleged that the accused broke his jaw during a previous attack in the flat.
Craig was arrested following that complaint but has not yet been charged with any assault.
The alleged hijacking offence occurred in Ballymena two months later while he was out on previous bail.
Craig took a man’s Peugeot 206 and driving licence, threatening that he would turn up at his house with a gun if he contacted police, it was claimed.
Earlier that night, according to the prosecution, the accused had stolen spirits from an off licence in the town.
Ms Pinkerton contended that before speeding off in the motorist’s car Craig offered him a bottle of Jagermeister and a swig from a bottle of Jack Daniels.
The defendant denies carrying out the offences, his lawyers stated.
Defence counsel Andrew Moriarty said that his client, who has been diagnosed with an alcohol dependency, has remained drug free in custody.
Granting bail to an address in Ballymena, Mr Justice Treacy ordered Craig to seek a medical appointment within 48 hours of his release.
The judge warned him: “You’re being release on bail just by the skin of your teeth... if you breach it in any shape or form you will go back to Maghaberry (Prison) and stay there until you’re dealt with.”