After the abolition of the slave trade in 1807, Britain got even more involved in Africa, patrolling the coasts if West Africa to intercept slave ships & enforce the ban. This was taken as a justification/excuse in order to establish British naval bases & trading posts that became strategically important for its control over the key sea route to India, as well as for economic interests: the exploitation/extraction of natural resouces in West & South Africa (minerals & precious metals such as gold, diamonds, copper or coal & agricultural products such as palm oil, rubber, cocoa, coffee, tea, cotton, etc.), especially after the discovery of diamonds & gold (1867,86).
However, British expansion in South Africa brought them into conflict with the Boers (Dutch settlers who had established independent republics) in the Boer Wars (1899-1902). Britain's involvement got to its highest point in the Scramble for Africa in the late 19th c, where European powers competed to claim as much African territory as possible.