A 23-years-old Derry man was released on bail when he appeared at the city's magistrates court charged with attempted murder.
Andrew Carlin, of Amelia Court in the Ballyarnett area of the city, was charged with a series of offences, including attempted murder and possessing a knife on December 2.
He was also charged with wounding the man with intent to cause grievous bodily harm, aggravated burglary of a house in Cornshell Fields with intent to commit GBH and aggravated burglary stealing a mobile phone.
Connecting Carlin to the charges and opposing bail, a PSNI officer told the court that shortly after 2am on December 2 police received a 999 call from a witness who named Carlin and said he had just stabbed a man.
The court heard police attended and found a man with a wound to his stomach and the witness who had contacted police earlier, told them Carlin had sent a 'threatening' social media message, stating he was 'coming round'.
The court was told there was 'a crash' at the door and Carlin and another man were said to have entered the house with Carlin armed 'with a large knife either a machete or a sword.'
The heard after the stabbing, both men were said to have left the premises and made off in a car.
The officer said bail was being opposed on the grounds that Carlin may not turn up for trial, fear of further offences and the unsuitability of the address as well as Carlin's 'serious record'.
A defence solicitor asked the officer had anyone made a witness statement and was told that only one witness had and identified the defendant 'by his eyes'.
The solicitor said the defendant's father would say that his son had been at work during the interim since the incident and also been in touch with probation.
The solicitor said there was no forensic evidence and any risk could be managed by conditions.
Deputy District Judge, Liam McStay, said the defendant had some 'offences at a high level' on his record.
He said the only real issue was the question of identification and he discounted the other objections to bail.
He released Carlin on his own bail of £500, a surety of £700, ordered him to observe a curfew and wear a tag.
He must also stay out of the Cornshell Fields and Leafair Park areas of Derry.
He was also ordered to have no contact with either the injured party or any witnesses in the case. Carlin will appear again on March 12.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.