JOHANNESBURG (Reuters) - Two white South African farmers were sentenced to up to 23 years in prison on Wednesday for the murder of a black youth who was thrown from a moving vehicle after being accused of stealing about 80 rand ($5) worth of sunflowers.

The death of 15-year-old Matlhomola Mosweu in April 2017 caused outrage in a country where deep racial divisions persist 25 years after the end of white minority apartheid rule.

Violent crime in South African farming communities has stirred racial tensions and protests. Blacks comprise 80 percent of the 54 million population but most of its wealth remains in the hands of whites, who make up about 8 percent.

The two defendants, Pieter Doorewaard and Phillip Schutte, were found guilty in October of murder, kidnapping, intimidation, theft and pointing of a firearm.

North West High Court Judge Ronnie Hendricks said in his sentencing that Mosweu’s murder was not planned nor premeditated, but the accused acted recklessly.

Slideshow ( 2 images )

The convictions and heavy sentences meted out were unusual in South Africa. In 2017, two white farmers were jailed for up to 14 years for attempted murder, assault and kidnapping after they were filmed pushing a wailing black man into a coffin.

Hendricks handed down varying sentences for each of offences, saying some would run concurrently.

Doorewaard will serve 18 years in prison including 15 for murder while Schutte will serve 23 years, 20 of which for murder. Both got three years for kidnapping, two for intimidation, one year for theft and two years for pointing of a firearm.

Violent protests erupted over the death of Mosweu in the farming community of Coligny, about 200 km (125 miles) northwest of Johannesburg, with angry residents setting ablaze homes and businesses belonging to whites.

“Murder is undoubtedly the most serious offense that can be committed,” Judge Hendricks said. “It cannot ignore that the community revolted as a result of this incident.”