Pre-colonial period. Before the arrival of Europeans, the territory of modern Djibouti was part of a complex network of sultanates and tribal federations. The north was dominated by Afar sultanates — Aussa, Tadjoura, Rahayto — while the south was the home of nomadic Issa Somali clans. The region had no single flag; instead, clan and sultanate banners were used, typically featuring Islamic symbolism such as the crescent and the shahada in Arabic script.
French Somaliland (1894–1967). The French arrived in 1862, when they purchased the port of Obock from the Afar sultan of Tadjoura. In 1894, the colony of French Somaliland (Côte française des Somalis) was officially proclaimed, with its capital in the newly founded city of Djibouti. Throughout the colonial period, the only official flag was the French tricolor. In 1958, after a referendum, the territory gained the status of an overseas territory of France; in 1967, after a second referendum, it was renamed the French Territory of the Afars and the Issas (Territoire français des Afars et des Issas, TFAI).
Flag of the TFAI (1967–1977). Between 1967 and 1977, the territory used its own flag: a white field with three vertical stripes near the fly — blue, green and red. This flag flew alongside the French tricolor and already contained the color palette that would partly carry over into the national symbol used today.
The independence struggle and Mahamoud Harbi. Mahamoud Harbi Farah (1921–1960) was a politician and trade-union leader who campaigned for independence from France during the 1958 referendum. After losing the vote and being accused of anti-government activity, he was forced into exile. He died on 29 September 1960 in a plane crash over Europe under unclear circumstances — many sources suggest a political assassination. The sketch of what later became the national flag is attributed to him. The struggle was carried on by movements such as the LPAI (Popular League for Independence) and the FLCS, which eventually forced Paris to call a third referendum.
Independence and adoption of the flag (1977). The referendum of 8 May 1977 returned an almost unanimous result — 98.8% in favor of independence. On 27 June 1977, at the official ceremony in the capital, the French tricolor was lowered and the national flag of Djibouti was raised for the first time. Hassan Gouled Aptidon, a leader of the Issa community, became the first president. The flag's colors — blue, green, white and red — codified the balance between the two main ethnic groups as a foundational principle of statehood. Since 1977, the flag has not been changed; the design has remained the same for more than 45 years.