Germany colonized Africa during two distinct periods. In the 1680s, the Margraviate of Brandenburg, then leading the broader realm of Brandenburg-Prussia, pursued limited imperial efforts in West Africa. The Brandenburg African Company was chartered in 1682 and established two small settlements on the Gold Coast of what is today Ghana. Five years later, a treaty with the king of Arguin in Mauritania established a protectorate over that island, and Brandenburg occupied an abandoned fort originally constructed there by Portugal. Brandenburg — after 1701, the Kingdom of Prussia — pursued these colonial efforts until 1721, when Arguin was captured by the French and the Gold Coast settlements were sold to the Dutch Republic.
Over a century and a half later, the unified German Empire had emerged as a major world power. In 1884, pursuant to the Berlin Conference, colonies were officially established on the African west coast, often in areas already inhabited by German missionaries and merchants. The following year gunboats were dispatched to East Africa to contest the Sultan of Zanzibar's claims of sovereignty over the mainland in what is today Tanzania. Settlements in modern Guinea and Nigeria's Ondo State failed within a year; those in Burundi, Cameroon, Namibia, Rwanda, Tanzania and Togo quickly grew into lucrative colonies. Together these six countries constituted Germany's African presence in the age of New Imperialism. They were invaded and largely occupied by the colonial forces of the Allied Powers during World War I, and in 1919 were transferred from German control by the League of Nations and divided between Belgium, France, Portugal, South Africa, and the United Kingdom.
The six principal colonies of German Africa, along with native kingdoms and polities, were the legal precedents of the modern states of Burundi, Cameroon, Namibia, Rwanda, Tanzania, and Togo. Chad, Gabon, Ghana, Kenya, Uganda, Mozambique, Angola, Nigeria, Central African Republic and Republic of the Congo were also under the control of German Africa at various points during its existence.