Bagamoyo, is a historic coastal town founded at the end of the 18th century, though it is an extension of a much older (8th century) Swahili settlement, Kaole. It was chosen as the capital of German East Africa by the German colonial administration and it became one of the most important trading ports for the Germans along the East African coast along the west of the Indian Ocean in the late 19th and early 20th century. Today, it is the capital of the Bagamoyo District in Pwani Region. In 2011, the town had 82,578 inhabitants.