The Second Boer War (Afrikaans: Tweede Vryheidsoorlog, lit. 'Second Freedom War', 11 October 1899 – 31 May 1902), also known as the Boer War, Transvaal War, Anglo–Boer War, or South African War, was a conflict fought between the British Empire and the two Boer republics (the South African Republic and Orange Free State) over the Empire's influence in Southern Africa.
The Witwatersrand Gold Rush caused a large influx of "foreigners" (Uitlanders) to the South African Republic (SAR), mostly British from the Cape Colony. As they, for fear of a hostile takeover of the SAR, were permitted to vote only after fourteen years of residence, they protested to the British authorities in the Cape. Negotiations failed at the botched Bloemfontein Conference in June 1899. The conflict broke out in October after the British government decided to send 10,000 troops to South Africa. With a delay, this provoked a Boer and British ultimatum and subsequent Boer irregulars and militia attacks on British colonial settlements in Natal Colony. The Boers placed Ladysmith, Kimberley, and Mafeking under siege, and won victories at Colenso, Magersfontein and Stormberg. Increased numbers of British Army soldiers were brought to Southern Africa and mounted unsuccessful attacks against the Boers.
However, British fortunes changed when their commanding officer, General Redvers Buller, was replaced by Lord Roberts and Lord Kitchener, who relieved the besieged cities and invaded the Boer republics in early 1900 at the head of a 180,000-strong expeditionary force. The Boers, aware they were unable to resist such a large force, refrained from fighting pitched battles, allowing the British to occupy both republics and their capitals, Pretoria and Bloemfontein. Boer politicians, including President of the South African Republic Paul Kruger, either fled or went into hiding; the British Empire officially annexed the two republics in 1900. In Britain, the Conservative ministry led by Lord Salisbury attempted to capitalise on British military successes by calling an early general election, dubbed by contemporary observers as a "khaki election". However, Boer fighters took to the hills and launched a guerrilla campaign, becoming known as bittereinders. Led by generals such as Louis Botha, Jan Smuts, Christiaan de Wet, and Koos de la Rey, Boer guerrillas used hit-and-run attacks and ambushes against the British for two years.
The guerrilla campaign proved difficult for the British to defeat, due to unfamiliarity with guerrilla tactics and extensive support for the guerrillas among civilians. In response to failures to defeat the guerrillas, British high command ordered scorched earth policies as part of a large scale and multi-pronged counterinsurgency campaign; a network of nets, blockhouses, strongpoints and barbed wire fences was constructed, virtually partitioning the occupied republics. Over 100,000 Boer civilians, mostly women and children, were forcibly relocated into concentration camps, where 26,000 died, mostly by starvation and disease. Black Africans were interned in concentration camps to prevent them from supplying the Boers; 20,000 died. British mounted infantry were deployed to track down guerrillas, leading to small-scale skirmishes. Few combatants on either side were killed in action, with most casualties dying from disease. Kitchener offered generous terms of surrender to remaining Boer leaders to end the conflict. Eager to ensure fellow Boers were released from the camps, most Boer commanders accepted the British terms in the Treaty of Vereeniging, surrendering in May 1902. The former republics were transformed into the British colonies of the Transvaal and Orange River, and in 1910 were merged with the Natal and Cape Colonies to form the Union of South Africa, a self-governing dominion within the British Empire.
British expeditionary efforts were aided significantly by colonial forces from the Cape Colony, the Natal, Rhodesia, and many volunteers from the British Empire worldwide, particularly Australia, Canada, India and New Zealand. Black African recruits contributed increasingly to the British war effort. International public opinion was sympathetic to the Boers and hostile to the British. Even within the UK, there existed significant opposition to the war. As a result, the Boer cause attracted thousands of volunteers from neutral countries, including the German Empire, United States, Russia and even some parts of the British Empire such as Australia and Ireland. Some consider the war the beginning of questioning the British Empire's veneer of impenetrable global dominance, due to the war's surprising duration and the unforeseen losses suffered by the British. A trial for British war crimes committed during the war, including the killings of civilians and prisoners, was opened in January 1901.