Nkosi Sikelel' i Afrika is a Christian hymn composed in 1897 by Enoch Sontonga, a teacher at a Methodist missionary school in Klipspruit, Johannesburg. The details of his life are sketchy, but it is known that he was born in Lovedale in the Eastern Cape, moved to Johannesburg upon finishing school and died in 1904.
It is also known that he was a devout Christian, who is said to have had an excellent voice, and wrote songs for his pupils to perform.
None of his songs was published, but he collected them in an exercise book, and musicians and teachers borrowed the texts from his widow.
According to historians, the hymn was first sung publicly in 1899 at the ordination of a Methodist minister.
Sontonga wrote the words for only the first stanza, which are in his native Xhosa, the black language of the Eastern Cape. The version sung today emerged from additions made by two other black South African writers.
One reason the anthem has been sung at black gatherings throughout the country is that it contains three languages in all. The first two stanzas are in a mixture of Zulu and Xhosa, very similar languages with the same Nguni root. A European analogy might be Spanish and Portuguese.
The Zulus and the Xhosas are South Africa's two biggest black tribes. The third biggest is the Sotho tribe, in whose language the third and fourth stanzas are written.
In 1912, the hymn was plucked from obscurity by John Dube, a Zulu headmaster from Durban who founded the African National Congress.
It was in memory of Dube that Nelson Mandela last week cast the first vote of his life at Dube's old school, the Ohlange Training Institution.
One of the co-founders of the ANC, the organisation's secretary, Sol Plaatje, recorded the song to a piano accompaniment in England on 16 October 1923 through a company called Zenophone.
Nkosi Sikelel' i Afrika was adopted as the anthem of liberation by the ANC in the 1920s, and it has been sung without fail at every ANC rally Mr Mandela has attended since his release in 1990.
But the ANC does not own the exclusive rights; it is also the anthem of the Pan-Africanist Congress, the radical minority organisation that splintered from the ANC in 1959.
More surprisingly, Nkosi Sikelel' i Afrika is also the national anthem of Zimbabwe, Zambia, Tanzania and Namibia, each of which sing translated versions. The reasons why Sontonga's hymn has passed beyond South Africa's borders are that the words make no mention of South Africa - rather they call on God to bless all of Africa and hear the voices of her people; the tradition of intense cross-pollination between the ANC and independence movements in neighbouring countries; and, no doubt, the resonance and beauty of the song itself.
When South Africa play Zambia at football on Tuesday, the anthem will, presumably, need to be played only once.