The years 1808 to 1814 were dominated by the Napoleonic Wars in which the British Army, allied with Spain and Portugal, fought to drive the French out of the Iberian Peninsula, ultimately taking the War into France where Napoleon was defeated at the Battle of Waterloo. There was little respite from military action. As the Empire expanded, partly thanks to British sea power and trade initiatives, the British were involved in conflicts all over the globe as they strove to maintain control and protect the raw materials provided by the colonies. The British had a presence in India from around 1757 but in 1858, following the Indian Rebellion, it became an official colony of the Empire providing access to the wealth of the continent as well as a providing a market for British goods. The Boer War (1899-1902) grew out of Britain’s drive to unite and expand its two colonies in South Africa, Cape Colony and Natal, which meant annexing the Boer Republics of the Orange Free State and the South African Republic (the Transvaal). Despite the skill of the Boer fighters, they were ultimately defeated by the Empire’s larger force.