A Ugandan High Court judge has ruled that media companies in the country should not publish the identities of people they say are homosexuals.
The decision was described as a "landmark ruling" by gay rights activists.
The case was brought against The Rolling Stone newspaper which last year published several lists of people its editor said were gay.
Many said they were attacked after their names and photos were printed.
Homosexual acts are illegal in Uganda and activists say the gay community still lives in fear.
"The judge granted a permanent injunction against Rolling Stone from publishing these names," lawyer John Francis Onyango, who represented the three gay rights campaigners who brought the case, told AFP.
"But the ruling went beyond these applicants and extended to all media," he added. BBC News