Djibouti gained its independence in 1977, but a referendum was held in 1958 on the eve of Somalia's independence in 1960 to decide whether or not to join the Somali Republic or to remain with France. The referendum turned out in favor of a continued association with France, largely due to a combined "yes" vote by the sizable Afar ethnic group and resident Europeans. However, the majority of those who voted "no" were Somalis who were strongly in favor of joining a united Somalia as had been proposed by Mahmoud Harbi. Harbi was killed in a plane crash two years later, and Hassan Gouled Aptidon, a Somali who campaigned for a yes vote in the referendum of 1958, wound up as Djibouti's first president post-independence (1977–1991).