A man escaped by plunging from a second-floor window after he was allegedly beaten and kicked about the head during a drinking session, the High Court has heard.
Prosecutors also claimed he was attacked with a chair leg at a flat in Strabane, Co Tyrone, over remarks about tragic schoolboy Noah Donohoe.
He turned up at the town's police station last week covered in blood and with one of his bones visible, a judge was told.
Details emerged as bail was granted to one of two alleged assailants.
Sean Wray (21), of Riverview House in Strabane, faces charges of false imprisonment and attempting to inflict grievous bodily harm.
Crown lawyer Iryna Kennedy said the injured party was bleeding heavily from a head wound when he arrived at the PSNI station on July 4.
"He also had a laceration to his hand showing bone, a swollen ankle and a swollen lip," she added.
The man said he had been drinking at a flat with Wray and a co-defendant when violence flared.
He claimed that he knew someone involved in stealing a laptop belonging to 14-year-old Noah Donohoe, whose body was discovered in a north Belfast storm drain six days after he went missing in June last year.
Those remarks allegedly provoked an angry reaction, with the man pulled from a sofa, kicked repeatedly about the head and beaten with the leg of a chair.
According to his account, the two assailants discussed the possibility of him informing police, with the co-accused shouting: "You are dying tonight."
He tried to flee but was dragged back into a bedroom, the prosecutor contended.
Mrs Kennedy told the court: "Eventually he was able to escape through a second-floor window and drop down to the street below, running to the police station.
"He believed he was chased, but is not sure by whom."
The man was taken to hospital where he received stitches to his hand and staples in his head wound.
Police discovered blood-spattered walls and signs of an attempted clean-up operation at the scene of the alleged attack, the court heard.
Defence barrister Eoghan Devlin argued that a witness did not name Wray as being involved in the violence.
Mr Devlin added that his client accepted being present in the flat.
"He gave an account that he was splitting up a vicious fight between two other men," counsel said.
Following submissions, Mr Justice Scoffield pointed out: "It seems this was an extremely nasty assault, and it is fortunate that (the complainant) was not even more seriously injured."
Granting bail to Wray, he banned him from either contacting the alleged victim or entering part of Strabane.