VENTERSDORP, South Africa — Whites and blacks faced off angrily in song Tuesday in front of a heavily guarded courthouse before the first hearing of a teenager and another farm worker who have allegedly confessed to killing a white supremacist leader in a wage dispute.

The death of Eugene Terreblanche, a militant leader once convicted of beating a black farm worker so badly the man was left brain damaged, has focused attention on simmering racial tensions less than 10 weeks before South Africa hosts the World Cup.

Police officers rushed to separate nearly 2,000 people split into white and black groups after a middle-aged white woman sprayed an energy drink on blacks singing the Zulu choruses of the country’s national anthem. Whites had earlier been singing the parts of the national anthem that are in Afrikaans and that date to the apartheid era.

Police set up coils of razor wire to separate the groups — whites who said they were there to support the family of Terreblanche and blacks supporting the family of the 15-year-old suspect and his 28-year-old co-worker.

Authorities say Terreblanche, 69, was bludgeoned to death Saturday in his bed. The 15-year-old’s mother told AP Television News that the suspects killed the farmer because he hadn’t paid them in months.