A white woman has been jailed in South Africa for yelling racist abuse at a black police officer, in a case that laid bare attitudes that endure more than two decades after the end of apartheid.

In a ruling that lawyers believed to be the first prison term imposed in South Africa for verbal racial abuse, estate agent Vicki Momberg was sentenced to three years, with one year suspended, for directing offensive slurs at the officer. Previously people convicted of the same crime have been fined.

A video clip went viral following the incident in 2016 when the police officer tried to help Momberg after thieves broke into her car at night at a shopping centre.

It showed her saying she wanted to be helped by a white or ethnic Indian officer, and that black people were “plain and simple useless” and “they are clueless”.

In her rant, she several times called the policeman a “kaffir”, apartheid-era slang for a black person and one of the worst terms of hate speech in South Africa.

Momberg wiped away tears as judge Pravina Rugoonandan read the ruling in a Johannesburg court on Wednesday, finding her guilty on four counts. Momberg’s lawyer, Kevin Lawlor, said she would seek the right to appeal against her sentence.

The episode highlighted how 24 years after Nelson Mandela became South Africa’s first black president, espousing reconciliation, the country is still struggling with race relations.

Despite the emergence of a black middle class, income gaps remain clearly visible along race lines, fuelling perceptions of white privilege. Black people make up 80% of South Africa’s population of 54 million, but most its wealth remains in the hands of white people, who account for about 8%.

The justice minister, Michael Masutha, said the custodial sentence could serve as a deterrent to others. “It was a question of escalating and intensifying the fight against racism by finding even more sterner measures,” he told eNCA television.

Johannesburg-based criminal lawyer Zola Majavu, who was not involved in the case, said: “This case has been put on the spotlight, it may be the first time – at least that I’m aware of – that a person has been sentenced to jail without the option of a fine for such action.”

In October, two white farmers who had been filmed pushing a wailing black man into a coffin were sentenced to jail for attempted murder, assault and kidnapping.

In 2016, a court ordered Penny Sparrow, a white woman, to pay 150,000 rand ($9,941 or £9,000) to charity after she was found guilty of hate speech for referring to black people as “monkeys” in a Facebook post.