The South African ambassador to Uganda, a former columnist for South Africa's Sunday Sun paper, has been found guilty of hate speech for an anti-gay article.
South Africa's Equality Court fined Jon Qwelane $14,450 (£8,920) and ordered him to apologise for promoting hatred in the column published in 2008.
Headlined "Call me names but gay is NOT OKAY", it caused an uproar at the time.
Mr Qwelane, who was appointed last year to Uganda where homosexual acts are illegal, did not mount a defence.
Correspondents say the outcome of the case is particularly significant in the light of the recent attacks and rapes of lesbian women in South Africa.
Unlike in many African countries, homosexual acts are legal in South Africa and discrimination based on sexual orientation is banned, but activists say gay and lesbian people are often attacked in townships.
"We are hoping really that this finding will send a message to community members, a message that says gay and lesbian people have an equal right to the protection of their dignity," said Vincent Moaga, spokesman for the South African Human Rights Commission, which initiated the complaint against Mr Qwelane.
The Sunday Sun officially apologised for the column following complaints after its publication, but Mr Qwelane refused to make an apology.
The court agreed with commission's argument that Mr Qwelane's article, and the cartoon accompanying it, had promoted hatred against homosexuals, causing them emotional suffering.
Mr Moaga said the money from the fine would be donated to gay rights organisations.
The BBC's Pumza Fihlani in Johannesburg says Mr Qwelane was appointed as ambassador last year, raising concerns that he would fuel tensions in Uganda which has come under intense international pressure over plans to tighten laws against homosexuality.
The Anti-Homosexuality Bill, first introduced in 2009 and yet to be voted on in Uganda's parliament, seeks to increase the penalties for homosexual acts from 14 years in prison to life.
It also proposes the death penalty for a new offence of "aggravated homosexuality" - defined as when one of the participants is a minor, HIV-positive, disabled or a "serial offender".