The Second Boer War (, , "Second Freedom War"), known variously as the Boer War, Anglo-Boer War, South African War or Anglo-Boer South African War, started on 11 October 1899 and ended on 31 May 1902. Britain defeated two Boer states in South Africa: the South African Republic (Republic of Transvaal) and the Orange Free State. Britain was aided by its Cape Colony, the Colony of Natal and some native African allies. The British war effort was further supported by volunteers from the British Empire, including Southern Africa, the Australian colonies, Canada, India and New Zealand. Inside Britain and its Empire there also was significant opposition to the Second Boer War. 

Britain was overconfident and under-prepared. The Boers were very well armed and struck first, besieging Ladysmith, Kimberley, and Mafeking in early 1900, and winning important battles at Colenso, Magersfontein and Stormberg. Staggered, Britain brought in large numbers of soldiers and fought back. General Redvers Buller was replaced by Lord Roberts and Lord Kitchener. They relieved the three besieged cities, and invaded the two Boer republics in late 1900. The onward marches of the British Army were so overwhelming that the Boers did not fight staged battles in defense of their homeland. Britain quickly seized control of all of the Orange Free State and Transvaal, as the civilian leadership went into hiding or exile. In conventional terms, the war was over. Britain officially annexed the two countries in 1900, and called a "khaki election" to give the government another six years of power in London.
What countries fought?
Britain defeated two Boer states in South Africa