At the onset of the war, the British were both overconfident about the chances of success in a military confrontation with the Boer republics and underprepared for a long-term conflict. British Prime Minister Lord Salisbury and members of his cabinet, in particular Colonial Secretary Joseph Chamberlain, ignored repeated warnings that Boer forces were more powerful than previous reports had suggested. In the last months of 1899, Boer forces launched the first attacks of the war, besieging the British-held settlements of Ladysmith, Kimberley and Mafeking, and winning several engagements against British troops at Colenso, Magersfontein and Stormberg. However, by the next year the British soon organized an effective response to these attacks, lifting the three sieges and winning several battles against Boer forces. The British, now deploying approximately 400,000 soldiers from across their colonial empire, successfully invaded and occupied the Boer republics. Numerous Boer soldiers refused to surrender and took to the countryside to carry out guerrilla operations against the British, who responded by implementing scorched earth tactics. These tactics included interning Afrikaner civilians from the Boer republics in concentration camps (in which roughly 28,000 people died) and destroying homesteads owned by Afrikaners to flush out the guerillas and deny them a base of civilian support. Using these tactics combined with a system of blockhouses and barriers to seal off Boer holdouts, the British were able to gradually track down and defeat the guerillas. In the 1902 Treaty of Vereeniging, the British formally annexed the Boer republics into the Cape Colony, ending the war.
