As Mikey says, the word kaffir, in South Africa, (now a criminal offense to use), is exactly the same as the 'N' word here.
Originally, I believe, it had a meaning something like 'non-believer', or 'heathen', and a vast tract of land abutting the British colony in South Africa was known as British Kaffraria for many years - the home of the Xhosa peolple. Eventually they got painted red on the map, and swallowed by the Empire too, and the area was renamed the Transkei.
The 'K' word just grew into SA English as a racial slur. Today, the gorgeous kaffirboom in SA has been rebranded the coral tree.
Thus endeth today's history lesson.
Cheers,
Mike