JOHANNESBURG — When Khaya Mthethwa breathed out the last notes of Nicki Minaj’s “Super Bass,” a song he had heard for the first time that same day, the judges of “Idols SA,” the South African version of “American Idol,” were blown away.

“Dude, you’ve just got it,” said Gareth Cliff, one of the celebrity judges, shaking his head.

“This is your competition to lose,” said Unathi Msengana, another judge.

Beyond the usual jitters of a contestant on a reality television program, singing his heart out and hoping for his big break, the weight of pop culture history weighed on Mr. Mthethwa’s shoulders: would he finally become the first black contestant to win “Idols” in his country?

At first glance, it might seem strange in a nation where 80 percent of the population is black that a singing contest decided by a popular vote had failed for years to produce a single black winner. But in South Africa, which for decades separated the races under the brutal apartheid system that put blacks at the bottom and whites on top, nothing, not even a singing competition, escapes examination under a powerful racial lens.