<P> Action was also taken against African leaders who refused to agree to British treaties to outlaw the trade, for example against "the usurping King of Lagos", deposed in 1851 . Anti-slavery treaties were signed with over 50 African rulers . The largest powers of West Africa (the Asante Confederacy, the Kingdom of Dahomey, and the Oyo Empire) adopted different ways of adapting to the shift . Asante and Dahomey concentrated on the development of "legitimate commerce" in the form of palm oil, cocoa, timber and gold, forming the bedrock of West Africa's modern export trade . The Oyo Empire, unable to adapt, collapsed into civil wars . </P> <P> In the late 19th century, the European imperial powers engaged in a major territorial scramble and occupied most of the continent, creating many colonial territories, and leaving only two fully independent states: Ethiopia (known to Europeans as "Abyssinia"), and Liberia . Egypt and Sudan were never formally incorporated into any European colonial empire; however, after the British occupation of 1882, Egypt was effectively under British administration until 1922 . </P> <P> The Berlin Conference held in 1884--85 was an important event in the political future of African ethnic groups . It was convened by King Leopold II of Belgium, and attended by the European powers that laid claim to African territories . The Berlin Conference sought to end the European powers' Scramble for Africa, by agreeing on political division and spheres of influence . They set up the political divisions of the continent, by spheres of interest, that exist in Africa today . </P> <P> Imperial rule by Europeans would continue until after the conclusion of World War II, when almost all remaining colonial territories gradually obtained formal independence . Independence movements in Africa gained momentum following World War II, which left the major European powers weakened . In 1951, Libya, a former Italian colony, gained independence . In 1956, Tunisia and Morocco won their independence from France . Ghana followed suit the next year (March 1957), becoming the first of the sub-Saharan colonies to be granted independence . Most of the rest of the continent became independent over the next decade . </P>

Who created the borders for the countries in africa
find me the text answering this question