A man allegedly brandished a knife and coughed at police officers after declaring he had Covid-19, a court has heard.
Ahmed Buuni is also accused of threatening to kill two Turkish neighbours during a confrontation at flats in south Belfast.
The 43-year-old defendant, a Somali national, claims he was the one attacked and robbed by suspected cocaine dealers.
Buuni faces charges of attempted grievous bodily harm, threats to kill, possessing an offensive weapon, criminal damage, common assault and assault on police.
Belfast Magistrates Court was told he allegedly approached the complaints with a large knife on Claremont Street on February 3.
"Fearing he would attack them, they locked themselves in their room," a Crown lawyer said.
PSNI officers called to the scene found Buuni on the stairs.
The prosecutor contended: "He approached police with the knife, putting them in fear. However, he dropped it when challenged.
"He was restrained... but informed police that he had Covid symptoms and began coughing directly at the officers."
During a bail application, defence counsel John O’Connor set out counter-claims that Turkish men living above Buuni were dealing cocaine.
"These Turkish nationals entered the applicant’s home with a knife, assaulted him and stole £40," the barrister alleged.
"He managed to take the knife off them. They fled and called police. When police arrived, he was standing in the communal stairwell holding the knife."
Judge Peter Prenter was told Buuni was an asylum seeker who arrived in Ireland nearly 20 years ago.
Granting bail for the accused to live at another address in the city, Mr Prenter barred him from returning to Claremont Street.