Rustenburg - A lawyer representing 14 Nigerian men pulled out of the case at the Rustenburg Magistrate's Court on Friday.
He put it on record that he was withdrawing as an attorney for safety reasons.
The men opted to conduct their own defence and proceeded with their bail application. The court ordered that the names and photographs of the men should not be published to protect their identities.
Warrant Officer Phehello Khuduga told the court it would be safe for the accused to remain in custody.
"The community is furious. They have indicated that if the accused are released on bail, they will take the law into their hands," he said testifying for the State, who were opposing bail.
He told the court the men were arrested at the Rustenburg police station on January 21, after they blocked the entrance of the police station preventing community members from entering or exiting the police station. They also blocked the streets close to the police station.
"They were part of [a group of] Nigerian men who were aggressive, shouting and displaying unruly behaviour at the police station," Khuduga said.
The Nigerian men went to the police station to complain that they were attacked and that the police were not assisting them. They allegedly went to the police station after they launched an apparent revenge attack, damaging property and robbing people in Rustenburg Noord and Waterval.
They were arrested for public violence for the incident at the police station, while some of the men faced additional charges of malicious damage of property, assault and robbery for the Waterval and Rustenburg Noord incidents. They appeared in separate courts for the Noord and Waterval incidents.
Khuduga told the court that accused one had four previous convictions of assault, possession of drugs, concealment of drugs and crimen injuria and had a warrant of arrest issued against him.
He had run away from his home in Rustenburg Noord following attacks on Nigerian nationals and had no alternative address, the court heard.
"He indicated that he can go somewhere and provide me with his new address, at the moment he had no other address. He is a married man with three children. He is self employed, he runs a spaza shop and a hair salon."
The court also heard that his permit expired in July 2015, and that he had been in the country illegally.
The other three accused had no proper documents allowing them to legally be in South Africa.
Accused 12 burst into tears when the court explained his right to legal representation.
"I did not do anything wrong, everyone knows me in Rustenburg, I am from Sunrise [Park]," he said sobbing while facing the public gallery. He later told the court that he was not well emotionally but would continue with the bail application.
The case was postponed to February 6. It is expected that Khuduga would testify about accused five.
Taxi drivers, owners and community filled up the courtroom and had earlier protested outside the court. They wanted the court not to grant the accused bail.
Eight guest houses were torched on January 10, when taxi drivers raided houses suspected of operating as brothels and drug dens. At the time, they said that they wanted to clean the city of drug and human trafficking.
The raid was targeted at Nigerian nationals, and on January 21, the Nigerians launched a revenge attack.