The country was known as the Union of South Africa between 1910 and 1961. In 1910 the British joined two colonies (the Cape Colony and Natal) with the two defeated Boer Republics (Transvaal and Orange Free State), which had been under British rule since the end of the Anglo-Boer War in 1902, forming the Union of South Africa. This name for the country lasted until 1961 when the National Party government narrowly won a referendum (limited to white voters) on the question of declaring the Union a Republic, a move that led to the country's leaving the Commonwealth, only to be readmitted in 1994. During these 50 odd years the country was first a colony, then an overseas dominion of the British Empire. After 1961, it was known as the Republic of South Africa, and has continued to be known as such since the ANC came to power in 1994.