The body of a man battered to death in Lurgan was discovered by a burglar two days later, the High Court has heard.
Andrew Lorimer was found dead at his flat in Portlec Place in the town during the early hours of February 5.
Three men aged, 18, 20 and 21, are charged the 43-year-old's murder.
Details of how his body was discovered were revealed as one of the accused, Christopher Wright, of Mount Zion House, Lurgan, applied for bail.
It has been alleged that Mr Lorimer was beaten, kicked and attacked with a hammer.
The judge was told Mr Lorimer is believed to have remained alive for hours after the drink and drug-fuelled assault.
It was claimed that Mr Lorimer invited the three men into his flat on February 3.
Police were told a pornographic movie was being shown on the television and that the victim allegedly made a suggestive remark to one of the accused.
Each of the three accused has given differing accounts of how the fatal injuries were inflicted.
Prosecuting barrister Kate McKay said: "The motivation is thought to be something with homophobic overtones."
Two days later, his body was found by a burglar.
"It turns out coincidentally that another man broke into the flat, he came across the body and contacted the emergency services," Mrs McKay disclosed.
"The medical evidence would say he (Mr Lorimer) was alive for a number of hours after the beating.
"He eventually succumbed and was found in due course by this man breaking in."
Defence counsel Michael Boyd told the court Mr Wright claimed to have tried to stop the others carrying out the assault.
"When he failed to do so he says he left the flat in disgust while the other two were still beating the man," Mr Boyd said.
It was claimed that Mr Wright was later told not to say anything about the assault.
Lord Chief Justice Sir Declan Morgan said the victim had been subjected to "a shockingly violent attack".
He said: "The deceased was savagely beaten as a result of which he died some hours later.
"I'm told that there is a very substantial evidence of extensive injuries, together with substantial quantities of blood which was found in or about the deceased's home."
Refusing bail due to potential further offending, the judge stated that the community has a right to be protected from "mindless violence".