Tadjoura, one of the Sultanates on the Somali coast, sold the port of Obock and adjoining lands In 1862 to the French for 52,000 francs and in 1888 French Somaliland was established.
Djibouti became the official capital of this French territory in 1892. The territory was reduced in size due to an agreement with Ethiopia in 1897. A railway was built to connect Djibouti with the Ethiopian backcountry, reaching Dire Dawa in 1903 and Addis Ababa in 1917. Between 1924 and 1934 the interior of the area was effectively opened up by the construction of roads and administrative posts; after World War II, Djibouti port lost trade to the Ethiopian port of Asseb, which is now regained by Eritrea. The status of an overseas territory was granted to French Somaliland in 1946 and in 1958 it voted to become an overseas territorial member of the French Community under the Fifth Republic.
Independence and the reunification of neighboring Somalia stimulated the emergence of anti-colonialist movements such as the Somaliland Liberation Front and the African League for Independence, both of which used the legal and armed branches.
Renewed resistance during the 1970's, forced Ali Arif, the acting governor, to resign. France called a plebiscite on the 8::SUP