A South African court on Tuesday refused bail for nine policemen accused of dragging a Mozambican taxi driver behind their van and then beating him to death in custody.
Magistrate Sam Makamu said the group could be in danger amid public anger over the case and as police officers could interfere with witnesses or evidence.
"I do not think it's in the interest of justice that they be released on bail," he told the court.
The ruling came after three days of hearings into the killing of Mido Macia, who died aged 27.
On February 26 bystanders filmed Macia being manhandled, handcuffed to the back of a police van and dragged hundreds of metres (yards) through the streets of Daveyton, a town east of Johannesburg.
Just over two hours later he was discovered lying dead in a blood-soaked cell with head wounds and bleeding on the brain, in a case that shocked South Africa and the world.
Macia family lawyer Andrew Boehner welcomed the ruling: "I think it gives the family a bit of relief. It allows us to go forward."
Prosecutors earlier told Benoni Magistrate Court that the policemen should not be granted bail as such a move could disrupt public peace.
Police had to protect the defence lawyers Monday when a small crowd of protesters attacked them leaving the court, amid outrage at apparent police brutality.
Outside the court on Tuesday, 30 jubilant Macia supporters danced and cheered after bail was denied.
They carried posters with wording: "Daveyton police are dogs" and "No Bail!"
Finkie Naka, wife of one of the accused told AFP she had mixed feelings about the magistrate's decision in light of the potential threat against her husband's life.
"Right now I'm happy because they're safe. On the other side I'm not because we need them."
The nine policemen have not yet entered a formal plea, but have stated they are not guilty.
"We do not even have evidence that would suggest these accused are the source of that death," defence lawyer Elias Tshole earlier told the court
The defence argues that Macia, a minibus taxi driver, had assaulted a policeman while resisting arrest after being confronted for parking his taxi on the wrong side of the road.
The driver of the police van claimed he drove away to escape an angry crowd that had gathered, and did not know Macia was being dragged behind.
None of the accused have explained how the Mozambican ended up cuffed to the van or dead in his cell.
Their lawyers Monday claimed the driver had killed five children in a car accident days before he died, apparently suggesting his injuries from that incident may have led to his death.
After Tuesday's ruling Jose Nascimento, a lawyer for the Mozambique government, said they were "happy with the outcome of the bail application."
"Due process of the law was followed and the presiding magistrate gave a solid judgement."