Tanga was chosen in 1889 as a military post of German East Africa, and became a district office in 1891. The local economy was based on sisal, which had been brought to the colony several years earlier, and population in the area grew rapidly. The town was also established as the terminus of the Usambara Railway line, which runs inland to Moshi at the foot of Kilimanjaro.
The name Tanga comes from the word for farm or cultivated land in several of the local languages (including Sambaa, Bondei, andZigua). Tanga gave its name to Tanganyika, literally meaning "Sisal Farm", the territory which in 1964 joined with the island of Zanzibar to form the modern nation of Tanzania.
As the coastal town closest to Kenya, Tanga was on the front line at the outset of World War I. A British landing was thrown back on 4 November 1914 in the Battle of Tanga, and the town was not taken until 7 July 1916