As the French pursued their part in the scramble for Africa in the 1880s and 1890s, they conquered large inland areas, and at first ruled them as either a part of the Senegal colony, or as independent entities. These conquered areas were usually governed by French Army officers, and dubbed "Military Territories". In the late 1890s, the French government began to rein in the territorial expansion and transferred all the territories west of Gabon to a single Governor based in Senegal, reporting directly to the Minister of Overseas Affairs.
In 1895, the first Governor General of Senegal was named. The territories he oversaw were formally named French West Africa as a colonial union of Senegambia and Niger, French Sudan, French Guinea and Côte d'Ivoire in 1904. The governor-general was based first in Saint-Louis and then in Dakar, started from 1902. French West Africa subsequently expanded to neighboring French-ruled territories: Mauritania in 1920, and when the territory of Upper Volta was divided from French Sudan by colonial decree in 1921, it automatically also entered the colonial federation.
Until after the World War II, like almost all the Africans living in the colonies of France, the African residents of French West Africa were lacking rights before the law, property ownership rights, rights to travel, dissent, or vote. However, the citizens of Four Communes of Senegal were the notable exception as they were granted equal political rights as the residents of France.
The Four Communes were entitled to elect a deputy to represent them in the French Parliament in the years 1848–1852, 1871–1876, 1879–1889, and 1907-1940. In 1914, Blaise Diagne, was elected as the African deputy for Senegal in the French Parliament. In 1916, Diagne pushed through the National Assembly a law to grant full citizenship to all residents of Four Communes, in return to help recruit millions of Africans to fight in World War I. Thereafter, all black Africans of Dakar, Gorée, Saint-Louis, and Rufisque could vote to send a representative to the French National Assembly.