France first came into contact with people from Gabon when France signed protection treaties with local chiefs in 1839 and 1841. France officially claimed Gabon as a territory in 1885 as part of the scramble for Africa. Administration by France began in 1903 and in 1910, Gabon became part of the newly formed federation of French Equatorial Africa. Gabon lasted as part of the colonial federation until 1959. During World War II, Gabon was held by Vichy French forces from June to November 1940, but otherwise was controlled by Free French forces. In August 1960, Gabon attained independence from France along with the other territories of the former French Equatorial Africa.
Since independence, Gabon has been "one of France's closest allies in Africa". As of 2008, around 10,000 French nationals lived and worked in Gabon, while the 6th Marine Infantry Battalion of the French military is also stationed there. When Gabonese president Omar Bongo died on June 7. 2009, Nicolas Sarkozy and Jacques Chirac were the only western heads of state to attend his funeral.