The history of the Senegalese flag is a history of short political eras: from precolonial states, through French rule and a brief federation, to an independent republic. Each stage left its mark on what the modern flag looks like.
Precolonial period. Before the Europeans arrived, large state formations existed on the territory of modern Senegal — the Jolof Empire (14th–16th centuries), the kingdoms of Cayor, Baol, Sine, Saloum and Waalo, and, in the southeast, parts of the Mali and Songhai empires. These states had no "flags" in the European sense, but they used standards, decorated cloths and the totemic emblems of their rulers — the damels. The green-yellow-red palette that would later anchor the flag was not used here directly: it entered African vexillology through Ethiopia and the 20th-century Pan-African movement.
French colonial era (1659–1958). Saint-Louis, founded by the French in 1659, is considered the first permanent European settlement in West Africa, and colonization spread out from it. Various versions of the French flag flew over the territory — from the royal fleur-de-lis standards to the tricolor of the French Revolution. In the 19th century, after the conquests of General Louis Faidherbe and others, Senegal became a key colony of French West Africa (Afrique Occidentale Française, AOF), with its capital at Dakar from 1902. AOF had no separate official flag of its own — the French tricolor was used; only certain auxiliary units such as the Tirailleurs sénégalais carried their own regimental colors.
Autonomy and the Mali Federation (1958–1960). On 25 November 1958, Senegal became an autonomous republic within the French Community. On 4 April 1959, Senegal and French Sudan (today's Mali) formed the Mali Federation, sharing a common flag: a vertical green-yellow-red tricolor with a black stylized human figure — the "kanaga" — at the center of the yellow stripe. This mask symbol was borrowed from Dogon culture and was meant to embody Black Africa. On 20 June 1960, the federation declared independence from France, but only two months later, on 20 August 1960, Senegal pulled out of the union over political differences between Senghor and Modibo Keïta.

The flag of the independent Republic of Senegal (since 1960). On that same 20 August 1960, Senegal adopted its own flag. The design kept the vertical layout and the Pan-African triad of colors from the federation, but the black kanaga mask in the center of the yellow stripe was replaced with a green five-pointed star. This decision is attributed personally to Léopold Sédar Senghor — poet and first president of the country (1960–1980): the star was meant to underline at once African identity, the harmony of Islamic, Christian and animist traditions, and a universalist outlook on the world. The flag has not been altered since — a rare case of stability in West Africa. Its status is fixed in Article 1 of the 2001 Constitution: "The emblem of the Republic is the green, yellow and red flag of three equal vertical bands, with a green five-pointed star in the center."
The flag in state life today. The Senegalese tricolor flies over the Presidential Palace in Dakar, appears on the uniforms of the national army, and accompanies Senegalese athletes at the Olympic Games and the Africa Cup of Nations — in particular, it was under this flag that the national football team won its first CAF trophy, the 2021 Africa Cup of Nations held in Cameroon. The constitutional definition of the flag is strict: any change would require an amendment to the Basic Law, which in Senegal — one of the most stable democracies in the region — happens rarely.