was only in the 1850s that the French began to expand onto the Senegalese mainland, after they abolished slavery and began promoting an abolitionist doctrine, adding native kingdoms like the Waalo, Cayor, Baol, and Jolof Empire. French colonists progressively invaded and took over all the kingdoms, except Siné and Saloum, under Governor Louis Faidherbe. Yoro Dyao was in command of the canton of Foss-Galodjina and was set over Wâlo (Ouâlo) by Louis Faidherbe, where he served as a chief from 1861 to 1914. Senegalese resistance to the French expansion and curtailing of their lucrative slave trade was led in part by Lat-Dior, Damel of Cayor, and Maad a Sinig Kumba Ndoffene Famak Joof, the Maad a Sinig of Siné, resulting in the Battle of Logandème. In 1915, over 300 Senegalese came under Australian command, ahead of the taking of Damascus by Australians, before the expected arrival of the famed Lawrence of Arabia. French and British diplomacy in the area were thrown into disarray. On 25 November 1958, Senegal became an autonomous republic within the French Community. Independence In January 1959, Senegal and the French Sudan merged to form the Mali Federation, which became fully independent on 20 June 1960, as a result of a transfer of power agreement signed with France on 4 April 1960. Due to internal political difficulties, the Federation broke up on 20 August 1960 when Senegal and French Sudan (renamed the Republic of Mali) each proclaimed independence. Léopold Sédar Senghor, internationally known poet, politician, and statesman, was elected Senegal's first president in August 1960. Pro-African, Senghor advocated a brand of African socialism. After the breakup of the Mali Federation, President Senghor and Prime Minister Mamadou Dia governed together under a parliamentary system. In December 1962, their political rivalry led to an attempted coup by Prime Minister Dia. The coup was put down without bloodshed and Dia was arrested and imprisoned. Senegal adopted a new constitution that consolidated the President's power. Senghor was considerably more tolerant of opposition than most African leaders became in the 1960s. Nonetheless, political activity was somewhat restricted for a time. Senghor's party, the Senegalese Progressive Union (now the Socialist Party of Senegal), was the only legally permitted party from 1965 until 1975. In the latter year, Senghor allowed the formation of two opposition parties that began operation in 1976—a Marxist party (the African Independence Party) and a liberal party (the Senegalese Democratic