MIDDELBURG, South Africa (Reuters) - Two white South African farmers who were filmed pushed a wailing black man into a coffin were sentenced to jail on Friday for attempted murder, assault and kidnapping.

Slideshow ( 9 images )

The 20-second video, widely circulated on social media last year, shows the victim, Victor Mlotshwa, cowering inside a coffin as one man pushes the lid down and the other threatens to put petrol and a snake inside.

The defendants - Theo Jackson, sentenced to 14 years, and Willem Oosthuizen, sentenced to 11 years - had pleaded not guilty. They said they had caught Mlotshwa trespassing on their farm in possession of stolen copper cables.

The case, heard at a court in Middelburg, about 160 km (100 miles) east of the capital, Pretoria, has caused outrage in a country where deep racial divides persist 23 years after the end of apartheid.

When she handed down the sentences, Judge Segopotje Mphahlele said she was appalled that the accused had put Mlotshwa into a coffin.

“The evidence before court indicates that the seriousness of the offence far outweighs the mitigating factors and the personal factors of the offenders,” she said. “The conduct of the accused fueled social division and racial tension.”

The defense immediately requested that it be allowed to appeal the sentence, but Mphahlele dismissed their application.

The defense then said it would lodge their appeal directly to the Supreme Court of Appeal, saying that the sentence was too harsh, since no one had been killed.

South Africa’s Justice Minister Michael Masutha said the sentence could serve as a deterrent to others.

“South Africa is no longer prepared to treat racism with kid gloves and we are ready to act,” Justice Minister Michael Masutha said in an interview with eNCA.

A large crowd formed outside the packed courtroom. The police presence around the court was heavy.

“What they did was painful to us,” Qgoga Mnyamezeli said outside the court.

Hundreds of members of the country’s main political parties, including the ruling African National Congress and the main opposition Democratic Alliance party, gathered outside carrying placards, some which said “Black Lives Matter!”, and shouting slogans in support of Mlotshwa.

Black people make up 80 percent of South Africa’s 54 million population, but most its wealth remains in the hands of whites, who account for about 8 percent of the population.