A Toomebridge man stabbed his best friend to death after being questioned about how he had got into the victim's flat, the High Court has heard.
Leon Johnston, 25, allegedly ran at Michael McLaughlin, inflicting knife wounds to his chest and neck during the attack in Castledawson, County Derry.
Details were disclosed as a judge overturned a decision to grant bail to Mr Johnston, of Ballydugennan Villas.
Mr Johnston denies the charge of murder.
Mr McLaughlin, 24, was stabbed four times in the attack last August, prosecutors said.
Earlier on the day he died, Mr McLaughlin had gone to a bar with his girlfriend - Mr Johnston's sister - and others to watch football.
Ian Tannahill, prosecuting, said they returned to the victim's Hillhead Road flat and found the accused asleep on a chair.
It was claimed that he woke, drunk, 30 minutes later and was asked how he had got into the property.
The accused said a door had been left open, but Mr McLaughlin believed he must have been kicked the door in.
According to witness accounts, Mr Johnston later emerged from the kitchen, ran past others and went straight for the victim with a knife.
Mr Tannahill told the court: "Michael McLaughlin cried out and his girlfriend saw blood squirting from him.
"He ran to the back door and fell to his knees saying 'Help me, I can't breath'."
Johnston allegedly told police after being stopped on the Hillhead Road that night: "It wasn't my fault, he just fell on the knife."
The court heard how the accused claimed to have no recollection during questioning, but also stated: "I'm sorry I did it. Michael was my best friend."
Defence lawyer Des Fahy said Mr Johnston should be released to live at an address in Coleraine, well away from the scene of the incident.
He contended that his client's family and pregnant girlfriend were "compelling reasons" for why he would stay within the area and turn up for trail.
However, reversing a district judge's decision to release the accused, Mr Justice Treacy said the allegations pointed to "a motiveless attack on an innocent man".
He added: "This is not a case where I have been persuaded it would be appropriate to grant the applicant bail."